[SGVLUG] A puzzling PHP / MySQL problem.

Matthew Gallizzi matthew.gallizzi at gmail.com
Wed Jan 31 19:50:45 PST 2007


Peter,

It sounds like PHP is the problem here... that query should be working. Have
you tried to echo when you run the query to see if something funny is
happening with the quotes?

On 1/31/07, Peter Fogg <peter.fogg at sbcglobal.net> wrote:
>
> 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 -
>
>


-- 
Matthew Gallizzi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.sgvlug.net/pipermail/sgvlug/attachments/20070131/98084554/attachment.html


More information about the SGVLUG mailing list