|
Posted by Jerry Stuckle on 11/24/49 11:27
wgerry wrote:
>
> //$query = 'SELECT * FROM `arrow` WHERE `Surname`LIKE \"%trimmed%\" ;
>
In addition to the other comments, this should be:
$query = "SELECT * FROM arrow WHERE Surname LIKE '%$trimmed%'" ;
The `s around the table and column name are unnecessary unless you have
a conflict with a reserved word. They don't hurt, they're just not
necessary.
However - you need single quotes around the LIKE value - and it should
be $trimmed - you forgot the '$'. Additionally, to get $trimmed to
expand, you need the whole thing in double quotes, not single (or
concatenate the strings together).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|