The query should read as below, without the = after the LIKE:
$query = SELECT uid, id, image, iname, quantity, type FROM
{$config[prefix]}_shop WHERE iname LIKE '%$shopsearch% ORDER BY
iname';
HTH
Maureen
Jennifer Downey [EMAIL PROTECTED] said:
Hi all,
I have been trying to build a
Sorry about that, I just pasted and took out the =, but I see another thing
that could be a problem:
$query = SELECT uid, id, image, iname, quantity, type FROM
{$config[prefix]}_shop WHERE iname LIKE = '%$shopsearch%' ORDER BY
iname;
The single quote was in the wrong place, it should have
Jennifer,
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
And Maureen is right! We just so *used* to seeing equal signs in SELECT
statements.
Smacking fist on head Miles Thompson
At 02:23 PM 4/25/2002 +, Maureen wrote:
The query should read as below, without the = after the LIKE:
$query = SELECT uid, id, image, iname, quantity, type FROM
Thanks Maureen,
I don't get the errors I was getting so that shows me you are great. Now my
next problem is if an item is found how do I echo or print that to the
screen. I have this as a starting point but I don't know where to go after
this.
if($search)
{
$query = SELECT uid, id, image,
From what I can see, you are not defining the array $row in here. You would
need to define something like:
$row=mysql_fetch_array($ret);
before calling it.
I finally found where the information on LIKE is in the manual (I can
understand your frustration, it took me a while). It is under
Hello!!
Your right!!
don't use = on the like part...I don't know what I was thinking!!!
Anyway here is the code right from my search page...
include(./navbar2.php);
$nav = new navbar;
$nav-numrowsperpage = 30;
$sql = SELECT Print_Name, Art_Job_Number, Size, Item_Number