Re: Search Database !

From: Date: Sun, 16 Jun 2002 21:20:42 +0000
Subject: Re: Search Database !
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-102423@lists.php.net to get a copy of this message
select * from products where %prod_name% like %ATX% this is wrong . .I try to execute it in the mysql through myphpadmin and I got error .. y ? what do I miss ? -- ~~~~~~~~~~~~~~~~ Sapilas@/dev/pinkeye ~~~~~~~~~~~~~~~~ "Chris Shiflett" <shiflett@php.net> wrote in message news:3D0CF68C.5090603@php.net... > select * from products where prod_name like '%your_word%' or description > like '%your_word%'; > > Replace "*" with whatever you are searching for *or leave it if you want > everything), and replace "your_word" with whatever term you are > searching for. > > Chris > > Septic Flesh wrote: > > >How can I do the following ? > > > >I have the following database: > > > >Products > >====== > >cat_id > >prod_id > >prod_name > >description > >manu_name > > > > > >The user is going to put a word as input, and I wanna search this word in > >the database. > > > >How do I make this QUERY to search for some letters (the given word) in the > >"prod_name" field or in the "description" field ? > > > > > >Thanks in advance ? > > > > > > > > > > > >-- > >~~~~~~~~~~~~~~~~ > > > >Sapilas@/dev/pinkeye > > > >~~~~~~~~~~~~~~~~ > > > > > > > > > > > >

« previous php.general (#102423) next »