I have the following code: $popular = mysql_query("SELECT hits, link FROM links ORDER BY hits DESC LIMIT 0,20"); while ($row = mysql_fetch__array($popular) { echo $row[link]; } Code (markup): It does fetch 20 links from the row, which are supposed to be sorted by hits from the most hits to the least hits. Only, it is not sorting the results properly. For example, a link with 35 hits will appear under a link with only 6 hits. Can someone PLEASE help me figure out why this is happening???? Thank you!!
+rep for you... I guess that was my problem. I changed it to integer and it works great now. When set as varchar, it took a number 9 and put it before 85, since the first number was 9. Thanks for pointing that out to me, I really aprpeciate it.