Re: Php/mysql error....why?
| From: | Tom Rogers | Date: | Fri, 24 Oct 2003 16:54:10 +0000 |
| Subject: | Re: Php/mysql error....why? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-167470@lists.php.net to get a copy of this message | ||
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