gazfocus Posted May 5, 2008 Share Posted May 5, 2008 I am trying to create a search page which will pull its results out of a MySQL database and I have got this working fine, but is there a way I can search for say title CONTAINS rather than title EQUALS so I can search for one word in an entire description? Thanks Quote Link to comment Share on other sites More sharing options...
IsmAvatar Posted May 6, 2008 Share Posted May 6, 2008 SELECT * FROM table WHERE name LIKE "%val"; where % is a wildcard. "%val" searches for strings ending with "val" "val%" strings starting with "val" "%val%" strings containing "val" anywhere. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.