e1seix Posted August 29, 2007 Share Posted August 29, 2007 Again, I'm having trouble understanding codes I've found online to make this work. What code could I use to search a table column if the word in question is entered into a form ie. it will be variable depending on what the user puts in. Also, it would have to not be an exact match to what the column entry is as I can't predict what will be entered, so if the word "AME" is searched it would return from the column both "AMERICAN SOLIDER" and "SAME OLD STORY" Can this be done easily without having to enter every conceivable possibility the user will input? Can someone point me to good articles or similar? Quote Link to comment https://forums.phpfreaks.com/topic/67226-solved-php-search-engine/ Share on other sites More sharing options...
mcmuney Posted August 29, 2007 Share Posted August 29, 2007 LIKE %AME% should do it. Quote Link to comment https://forums.phpfreaks.com/topic/67226-solved-php-search-engine/#findComment-337203 Share on other sites More sharing options...
Jessica Posted August 29, 2007 Share Posted August 29, 2007 To expand on what mcmuney said: So if the search variable is $search it would be WHERE column = '%$search%' Quote Link to comment https://forums.phpfreaks.com/topic/67226-solved-php-search-engine/#findComment-337210 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.