I get this problem all the time on my website. It keeps coming back Unknown column 'hits' in 'order clause' the website is www.chatthailand.com PHP: you can see the problem on the first page
^ He posted the error message TWICE. And the error indicates there's no field called "hits" in your table.
Seems more like a SPAM than anything else. theres no errors on the site whatsoever on that front page
The problem come when i refresh many times and random there is a problem in $sqlmv = "select id, username, created, hits from members order by hits DESC limit $MVShowLimit"; PHP: from what i understand i will try to get a screen shot this is the code i use function DisplayMostViewed($MVShowLimit){ global $DB; $sqlmv = "select id, username, created, hits from members order by hits DESC limit $MVShowLimit"; $resultmv = mysql_query($sqlmv) or die(mysql_error()); PHP: function DisplayMostViewed($MVShowLimit){ global $DB; $sqlmv = "select *from members order by hits DESC limit $MVShowLimit"; $resultmv = mysql_query($sqlmv) or die(mysql_error()); PHP:
Are you sure that 'hits' exists in your db? and I don't understand that you guys only use lower-case letters in sql queries.. That makes it way more difficult to find and fix errors. Do it like: $sqlmv = "SELECT id, username, created, hits FROM members ORDER BY hits DESC LIMIT $MVShowLimit";
We found and fixed the problem and then it changed to Unknown column 'id' in 'field list' and then we fixed that and this error came Table 'ylb_org.files' doesn't exist We do not have the files on this database