flaab Posted February 24, 2007 Share Posted February 24, 2007 Hello all =) I'm from Spain so sorry about my lame english. I'm programming a little search engine for my website. It looks up over keywords(tags) stored in the database. My question is...what if i want to suggest to the user "alike" tags to search for? Here is an example. John searches for "kiss" and nothing is retrieved. But in the database there is a keywords named "kisses". How can i tell John..."We suggest you to try kisses"?? I tried a query like this but it did not work: SELECT tag FROM `tags` WHERE name = 'kiss*' I'll appreciate any help. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/39931-solved-retrieving-alike-fields/ Share on other sites More sharing options...
paul2463 Posted February 24, 2007 Share Posted February 24, 2007 SELECT tag FROM `tags` WHERE name LIKE 'kiss%' //returns all rows with the word kiss and any extra characters after it so kisses would be found Quote Link to comment https://forums.phpfreaks.com/topic/39931-solved-retrieving-alike-fields/#findComment-192980 Share on other sites More sharing options...
flaab Posted February 24, 2007 Author Share Posted February 24, 2007 Thanks a lot =) Quote Link to comment https://forums.phpfreaks.com/topic/39931-solved-retrieving-alike-fields/#findComment-193006 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.