rempires Posted January 10, 2008 Share Posted January 10, 2008 is it possible to search for a word in a text field? what i want to do is have a text field filled with discriptve words ex: fantasy, science, non-fiction, fiction and then a user could search a word and if he typed in say fantasy it would load all the data from that row in the database somthing like SELECT * FROM events WHERE thisTextField contains "keyword" Link to comment https://forums.phpfreaks.com/topic/85296-searching-a-text-field/ Share on other sites More sharing options...
teng84 Posted January 10, 2008 Share Posted January 10, 2008 SELECT * FROM events WHERE thisTextField like '%keyword%' will return all the fields having the word keyword case insensitive Link to comment https://forums.phpfreaks.com/topic/85296-searching-a-text-field/#findComment-435224 Share on other sites More sharing options...
fenway Posted January 10, 2008 Share Posted January 10, 2008 You should look at full-text indexing,too. Link to comment https://forums.phpfreaks.com/topic/85296-searching-a-text-field/#findComment-435573 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.