Re: Search Database !

From: Date: Sun, 16 Jun 2002 20:35:24 +0000
Subject: Re: Search Database !
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-102420@lists.php.net to get a copy of this message
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 (#102420) next »