In the manual it's probably under the SELECT heading. (I've not checked, 
but that's a godd spot to start looking for the bits that can amke up the 
WHERE clause.)

Try removing the single quotes - you have one before >%shopsear< and 
another following iname, as > iname'" <

Sorry this is a bit vague, but if you need the single quotes arounf 
shopsearch you may have to build up the SQL statement bit by bit. Remember 
to echo $query so that you will know if it look right.

Cheers - Miles

At 07:15 AM 4/25/2002 -0700, Jennifer Downey wrote:
>Hi all,
>I have been trying to build a search script for my site that deals with only
>one table in my db.
>As Julie Meloni pointed out look in the MySQL manual for LIKE clauses I
>can't seem to locate that clause in ether
>Dan Brunner gave me this to go on:
>$query = "SELECT uid, id, image, iname, quantity, type FROM
>{$config["prefix"]}_shop WHERE  iname  LIKE = '%$shopsearch% ORDER BY
>$ret = mysql_query($query);
>But I can't seem to get this to work. I have never worked with LIKE before
>and would appreciate any help on this.
>Thanks Julie and Dan for your time and effort.
>Thanks all for your time and help
>The sleeper has awaken
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (
>Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
>PHP Database Mailing List (
>To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to