jd2007 Posted July 8, 2007 Share Posted July 8, 2007 i created a search engine but it can only search one word... How do i create a php search engine which allows the user to input multiple words ? Link to comment https://forums.phpfreaks.com/topic/58940-how-do-i-create-a-php-search-engine-which-allows-the-user-to-input-few-words/ Share on other sites More sharing options...
xyn Posted July 8, 2007 Share Posted July 8, 2007 preg_match() Link to comment https://forums.phpfreaks.com/topic/58940-how-do-i-create-a-php-search-engine-which-allows-the-user-to-input-few-words/#findComment-292458 Share on other sites More sharing options...
jd2007 Posted July 8, 2007 Author Share Posted July 8, 2007 how do i search for it on a database ? Link to comment https://forums.phpfreaks.com/topic/58940-how-do-i-create-a-php-search-engine-which-allows-the-user-to-input-few-words/#findComment-292461 Share on other sites More sharing options...
Wuhtzu Posted July 8, 2007 Share Posted July 8, 2007 "SELECT * FROM table WHERE field LIKE %$word1% or %$word2% or %$word3%" Link to comment https://forums.phpfreaks.com/topic/58940-how-do-i-create-a-php-search-engine-which-allows-the-user-to-input-few-words/#findComment-292471 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.