|
I've got a table set up for allowing people to vote on content items, with the structure like so:code:
The problem is trying to find the mostly liked content item from this table. The query I'm currently using is: code:
Is there a particular way to assign ENUM values to 'fake' columns, so I could do '(yay/nay) AS ratio'? Or is there a better way to achieve the same result? Any help is appreciated.
|
# ¿ Dec 3, 2007 01:00 |
|
|
# ¿ Apr 29, 2024 03:07 |
|
Thanks for the help with the voting query, but I have another question regarding grouping DATETIME fields. I've got a table called 'views' that's laid out like so: code:
code:
Ideally, I'd like to be able to plot the results out like how Steam does. I've had a brief look at the INTERVAL function, but it's hard to find examples of how to use this in a GROUP query.
|
# ¿ Dec 10, 2007 01:32 |