i want to search my database for example i want to search the word "google yahoo"

Posted by user2926370 on Stack Overflow See other posts from Stack Overflow or by user2926370
Published on 2013-10-28T00:43:30Z Indexed on 2013/10/28 9:54 UTC
Read the original article Hit count: 275

Filed under:
|
|

i want to search my database for example i want to search the word "google yahoo" and when i enter that i should able to look the rows which has google and yahoo. It is not required to be in the same order and google besides yahoo. No matter wherever it is in the line and give me a simple logic to it. i can able to query that thing.something like select * from table where column like("%google%yahoo%"). I want to develop this thing in php but how can i insert %. Do i need to use if statement so that i can insert % in between the words whenever i find spaces orelse is there any other logic to do it simpler?

© Stack Overflow or respective owner

Related posts about php

Related posts about search