Re: Photo of the Month?
This turns out to be more problematic than I thought. The sql may be beyond my skill level. Anyone here able to take a crack at it?
We need a slice of the posts table given by date rate, joined with the rate info.
Now it's like we need another query on that result to determine the highest rated. Nested selects are beyond me (but I can learn if someone here is patient).
I also wonder what the results might look like. We have some photos that are favourites. Due to new members, these may show up as pic of the month again and again. Ever been in a burger joint where the employee of the month is twelve photos of the same face? The criteria may need to be tweaked somehow. Exclude past winners? Only query photos posted in the given month?
In playing with it, I also notice we have "Worst photo". High number of votes but very low score.
I can do it in code with loops, but it wouldn't be terribly efficient. But then maybe with all these extra consideration, that kind of sift and sort is required.
Certainly want to see results for variable periods: photo of the day, week, month, year. Might not use them all but might be surprised...
Appreciate more feedback.