I want to store how many times someone likes an article on my site in my mysql database, so I can sort it and have things like most liked, does anyone know how to do this?
Increment a counter each time [whatever] is clicked
use an ORDER BY clause in your query
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
Yeah you can use the counter as a hidden field so that whenever a person likes a particular article you can determine the article being like and update your database or an array as such.
If you just need the number of likes from your site only then the above said options are the best and easiest way. But if you need to fetch all the likes then use