this is my error Database error: Invalid SQL: SELECT count(id) as total FROM ads WHERE NOT EXISTS (SELECT * FROM click_history WHERE click_history.type='ptc' AND click_history.username='admin' AND click_history.ad_id=ads.id) and credits>=1 and (country='' or country='') and (daily_limit>views_today or daily_limit=0) and (upgrade='0' or upgrade='1') MySQL Error: 1064 (You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'upgrade='0' or upgrade='1')' at line 6) Session halted. is it an easy fix? thanks
UPGRADE is a reserved word in MySQL. To use reserve words, you need to use back ticks around them. Here is a complete list of mysql reserved words.