Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Using PHP to search an entire column contents in MySQL


Air - 5:03 pm on Nov 8, 2001 (gmt 0)


everything ggrot said, and if you wanted to search for occurances of the incoming form variable string:

$query = "SELECT * FROM some_table WHERE some_field LIKE \"%$Fieldname%\";

eg. suppose the form variable $Fieldname contained the value Horses, the above query would return every row where some_field contained the string Horses.


Thread source:: http://www.webmasterworld.com/php/351.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com