ryel01 Posted November 17, 2008 Share Posted November 17, 2008 Hi On Yahoo's contact us page they display a form where you post a question and it returns "relevant" frequently asked questions which you can choose from for more information. I presume the FAQ database table just contains a list of questions as displayed in the results. But what I'd like to know is how would you structure the sql query using the question that was asked to search against the records to retrieve the most relevant results? for eg... User entered Question: "The buyer has not paid me" "select * from faqtable where question like '%the%' or question like '%buyer%' or question like '%has%' or question like '%not%' or question like '%paid%' or question like '%me%'" Is that the "right" way to structure the query or is there a better way to do it? Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/133007-a-question-about-frequently-asked-questions/ Share on other sites More sharing options...
fenway Posted November 17, 2008 Share Posted November 17, 2008 This is full-text indexing. Quote Link to comment https://forums.phpfreaks.com/topic/133007-a-question-about-frequently-asked-questions/#findComment-692166 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.