SELECT b.bubble_id,
b.bubble_name,
b.rate,
COUNT(DISTINCT bid) as cn,
DATE_FORMAT(date, '%m-%d-%y') as date
FROM bubbles b, rate r
WHERE b.id=r.bid
GROUP BY r.date
ORDER BY r.date DESC LIMIT 15
Ok thats really invalid, but I need to do this.
This is a rate script, every time someone rates it records what they rated, the day they rated, who they rated.
So I need to select who got rated the best from the past 15 times.
So once I get the results I can print
By highest votes for each day
2003-10-22 | Votes: 10 | Program Name
2003-10-21 | Votes: 12 | Program Name
2003-10-20 | Votes: 03 | Program Name
2003-10-19 | Votes: 24 | Program Name
2003-10-18 | Votes: 07 | Program Name
2003-10-17 | Votes: 13 | Program Name
2003-10-16 | Votes: 44 | Program Name