fraser5002 Posted February 28, 2010 Share Posted February 28, 2010 Hi, Im new to MYSQL and i have just been playing around with it i have managed to set up a simple search page to search my SQL database and display records that match my input. But what i really want is to have one of the fields in my database for the record called keywords and have multiple values in here separted by commas e.g keyword1,keyword2,keyword3,keyword4 and the user will type in a search query and if it equals any of these above keywords in the field for that record it will return the record as normal. How do i do this or is there a better way of doing what i want to achieve? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/193674-mysql-field-with-multiple-keywords-search/ Share on other sites More sharing options...
mapleleaf Posted March 1, 2010 Share Posted March 1, 2010 I think you may want find_in_set($_POST['keyword'], column_name); Quote Link to comment https://forums.phpfreaks.com/topic/193674-mysql-field-with-multiple-keywords-search/#findComment-1020014 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.