Hello I'm trying to display the most popular link. The MySQL click column increases by each click on each link.. Here's MySQL Query I'm trying to use:
SELECT link, MAX(clicks) FROM $table GROUP BY clicks DESC LIMIT 0,1
This returns <!-- m --><a class="postlink" href="http://www.b-man.dk">http://www.b-man.dk</a><!-- m --> as the most popular site but it just has 5 clicks but while others have 10-11 clicks and some of them have 0 clicks..
Can you guys help me?
SELECT link, MAX(clicks) FROM $table GROUP BY clicks DESC LIMIT 0,1
This returns <!-- m --><a class="postlink" href="http://www.b-man.dk">http://www.b-man.dk</a><!-- m --> as the most popular site but it just has 5 clicks but while others have 10-11 clicks and some of them have 0 clicks..
Can you guys help me?