Re: Search tutroial

From: Date: Wed, 24 Apr 2002 18:47:14 +0000
Subject: Re: Search tutroial
References: 1 2 3  Groups: php.db 
Request: Send a blank email to php-db+get-18781@lists.php.net to get a copy of this message
By the way SELECT uid, id, image, iname, quantity, type, user where it shows below that user isn't in the query- it is there in my editor. I just forgot to put it in before sending. Jennifer "Jennifer Downey" <jendowney@attbi.com> wrote in message news:20020424184405.13483.qmail@pb1.pair.com... > This is basically what I am trying to do > if($search) > { > $query = "SELECT uid, id, image, iname, quantity, type FROM > {$config["prefix"]}_shop WHERE iname = $shopsearch"; > $ret = mysql_query($query); > while(list($quantity)=mysql_fetch_row($ret)) > > $name = $row['user']; > echo $name; > > }else{ > > echo "<FORM METHOD=post ACTION='$PHP_SELF'>"; > echo "Search Shops<BR><input type=text name=\"shopsearch\" > value=\"\">"; > echo "<BR><INPUT TYPE='submit' NAME='search' > VALUE='Search'>"; > > } > > This is a dump of the table > > uid int(10) NOT NULL default '0', > id int(5) NOT NULL default '0', > iname varchar(50) NOT NULL default '', > image varchar(100) NOT NULL default '', > quantity int(10) unsigned NOT NULL default '1', > type varchar(20) NOT NULL default '', > price int(6) NOT NULL default '0', > user varchar(50) NOT NULL default '', > KEY uid (uid) > > Just a note this works throughout my site and I have no trouble with it: > {$config["prefix"]}_shop > I'm not trying to be rude but I get sick of it when people tell me that this > is the problem when it has nothing to do with the question I am asking. > > Thanks for your time and help > Jennifer > > "Julie Meloni" <julie@thickbook.com> wrote in message > news:94353938640.20020424111452@thickbook.com... > > > > JD> Would someone kindly point me to a tutorial on designing a search > script for > > JD> mysql db. > > JD> I have tried to build one but can't get anywhere with it. > > > > Well, that would depend on what and how you are searching, your table > > structure, etc. Essentially, every SELECT query is a "search". > > > > If you post more information about your table(s) structure, your > > search methods and the search parameters, people would probably be > > able to help you. > > > > > > - Julie > > > > --> Julie Meloni > > --> julie@thickbook.com > > --> www.thickbook.com > > > > Find "Sams Teach Yourself MySQL in 24 Hours" at > > > > http://www.amazon.com/exec/obidos/ASIN/0672323494/thickbookcom-20 > > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002 > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

« previous php.db (#18781) next »