Could not successfully run query: 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 '%') OR (dealer_name LIKE '%TOM'%')) LIMIT 1' at line 1

SELECT dealer_id FROM dealers_rvtrader where `condition`='N' and state='AZ' and city='MESA' and ((dealer_name LIKE '%TOM'%') OR (dealer_name LIKE '%TOM'%')) LIMIT 1