[PHP] Php/mysql error....why?
Hi, I am running a very simple query to the database, basically select all the firms which start with 0-9, eg. 1stcompany 3isgood etc using this: $qry = select cust_no,firm from companies where firm LIKE `%0123456789%'; It gives me this error: Error: Unknown column '0123456789%'' in 'where clause' any idea why its ignoring the LIKE statement? the funny part is LIKE is working for another program.. What am i missing? Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Php/mysql error....why?
`%0123456789%'; You have a ` instead a ' before the %0123. I believe that is what is causing your grief. -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php/mysql error....why?
Hi, Saturday, October 25, 2003, 2:50:46 AM, you wrote: RA Hi, RA I am running a very simple query to the database, basically select all the RA firms which start with 0-9, RA eg. RA 1stcompany RA 3isgood RA etc RA using this: RA $qry = select cust_no,firm from companies where firm LIKE `%0123456789%'; RA It gives me this error: RA Error: Unknown column '0123456789%'' in 'where clause' RA any idea why its ignoring the LIKE statement? the funny part is LIKE is RA working for another program.. RA What am i missing? RA Thanks, RA -Ryan You have a backtick instead of a quote (`%) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php