SELECT name FROM sites WHERE description LIKE '%best%' AND description LIKE
'%net%'
should do what you want i think :)
% = wildcard for any character, any number of tiems
_ = wildcard for any character, once only
HTH
Beau
// -----Original Message-----
// From: Selvin Sakal [mailto:[EMAIL PROTECTED]]
// Sent: Tuesday, 1 May 2001 2:18 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Computer Exploded!!!
//
//
// My computer didn't explode i just wrote that to get attention.
// My question
// is this - I have a table which looks like this -
//
// CREATE TABLE sites
// (
// ID INT NOT NULL AUTO_INCREMENT,
// name VARCHAR(30) NOT NULL,
// keywords VARCHAR(200) NOT NULL DEFAULT 0,
// description VARCHAR(200) NOT NULL DEFAULT 0,
// url VARCHAR(50) NOT NULL,
// rank blob NOT NULL,
// PRIMARY KEY (ID)
// );
//
// there is a index on keywords and description
//
// what i would like to know is how to search description to see if
// it contains
// a word like 'web'.
//
// i would also like to know how to search description and keyword
// for specific
// words like this -
//
// say description has 'the best search engine on the net'
//
// i want to search for all the descriptions that contain 'best' and 'net'.
//
// If i don't get help soon my computer might explode.
// _________________________________________________________________________
// Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
//
//
// --
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, e-mail: [EMAIL PROTECTED]
// For additional commands, e-mail: [EMAIL PROTECTED]
// To contact the list administrators, e-mail: [EMAIL PROTECTED]
//
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]