[SGVLUG] A puzzling PHP / MySQL problem.

Peter Fogg peter.fogg at sbcglobal.net
Wed Jan 31 19:16:48 PST 2007


Good evening all,

The following query results in a mysql error if executed by PHP but 
succeeds if entered into the SQL window of phpMyAdmin:

SELECT eventID, venueID, title, summary, eventType, eventSubtype, 
eventStartDate, eventStartTime, admissionPrice FROM events WHERE (title 
LIKE '%a%') ORDER BY title ASC

ERROR 1: 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 1.

The server is an iMac OS 10.3.9, MySQL 5.0.16-standard, PHP Version 
5.0.4.

Peter -



More information about the SGVLUG mailing list