Re: [PHP-DB] Search Script

2002-04-25 Thread Dan Brunner
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_Num

Re: [PHP-DB] Search Script

2002-04-25 Thread Maureen
>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 P

Re: [PHP-DB] Search Script

2002-04-25 Thread Jennifer Downey
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, i

Re: [PHP-DB] Search Script

2002-04-25 Thread Miles Thompson
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

Re: [PHP-DB] Search Script

2002-04-25 Thread Miles Thompson
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

Re: [PHP-DB] Search Script

2002-04-25 Thread Maureen
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

Re: [PHP-DB] Search Script

2002-04-25 Thread Maureen
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 buil

[PHP-DB] Search Script

2002-04-25 Thread Jennifer Downey
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 manual. Dan Brunner gave me this to go on: $query = "SELECT uid, id, image, i