[PHP-DB] Re: [PHP] keyword search From: Intruder (intruder <email protected>)
Date: 10/13/01

SP> Does anybody know how to program a "keyword search" through a
SP> database?
SP> Because at this moment my search string does only display the exact word
SP> that I typed and leaves all other records away. What I really want is
SP> that PHP will look for if my search string excist in the data base and
SP> shows all the records that matches the contens. (I hope I can make
SP> myself clear!)

SELECT *
FROM table
WHERE keyword_field LIKE "%$keyword_value%"

Of course you can make it more complicated! ;))

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>