Im trying to retrieve items from my database ordering them by which one has the highest votes… it structured like this
id - title - votes
1- something - 3213, 34234, 65436, 23, 345, 54532
2- other - 342,
3- title - 123, 3562, 642
4- etc - 0
5- etc - 432424, 34243
the random numbers would stand for user id, and everytime a user votes, his id simply gets added to the field, seperated by a comma
so basicly i figure i would have to count the number of commas, and see which one has the most… making the order
1- something - 3213, 34234, 65436, 23, 345, 54532,
3- title - 123, 3562, 642,
5- etc - 432424, 34243,
2- other - 342,
4- etc - 0
also, how would i got about checking if the user already voted?
thanks