RE: [PHP] how to do a search in mysql database for multiple keywords??

From: Date: Sat, 13 Oct 2001 13:51:17 +0000
Subject: RE: [PHP] how to do a search in mysql database for multiple keywords??
Groups: php.general 
Request: Send a blank email to php-general+get-70977@lists.php.net to get a copy of this message
you build your query : SELECT * FROM MyTable WHERE MyField like '%keyword1%' or MyField like '%keyword2%' ..... ORDER BY MyField LIMIT 1,10 This is just an example... you can play with this as you like and do a "and" instead of or, you can also use "=" instead of LIKE.... Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -----Original Message----- From: Nicklas Bondesson [mailto:nicke@najki.nu] Sent: Saturday, October 13, 2001 3:38 PM To: php-general@lists.php.net Subject: [PHP] how to do a search in mysql database for multiple keywords?? need some help on this. i've come so far that i have split up the variable with explode and putting it into an array that looks like this: 'keyword1','keyword2'. but it doesn't doesn't work satisfactory... any ideas?? /nicke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#70977) next »