What is wrong with my SQL statement? I moved this application from a PHP4 server to a PHP5 server with a higher version of MySQL. It was working on the old server but now I am getting an error in the syntax.
Code:
MySQL Error: 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 '' at line 24
Code:
SQL Statement: SELECT * FROM agency WHERE date_time LIKE '%%' AND city LIKE '%%' AND county LIKE '%%' AND impact_agenda LIKE '%%' AND agency_category LIKE '%%' AND (org_name LIKE '%%' OR address LIKE '%%' OR city LIKE '%%' OR state LIKE '%%' OR mail_address LIKE '%%' OR mail_city LIKE '%%' OR mail_state LIKE '%%' OR homepage LIKE '%%' OR name_on_501 LIKE '%%' OR org_phone LIKE '%%' OR contact_phone LIKE '%%' OR fax LIKE '%%' OR org_description LIKE '%%' OR first_name LIKE '%%' OR last_name LIKE '%%' OR email LIKE '%%' OR date_time LIKE '%%' OR impact_agenda LIKE '%%' OR agency_category LIKE '%%') ORDER BY id DESC LIMIT 0,
Comment