sundance1980
MIS
Hello all Here is my problem.
I am searching titles in an article database.
I have two titles:
mouse cleaning
and
cleaning your computer
Now If I do a search for "cleaning mouse" I get 0 results. If I do "cleaning computer' I get 0 results. But If I do mouse cleaning, mouse, cleaning your,I get the articles.
This is my query from a simple form input. The form value is called "search_value"
$query = "SELECT id,title, post, DATE_FORMAT(date,'%M %D, %Y') AS date FROM article WHERE title LIKE '%". $search_value ."%' ORDER BY id DESC LIMIT $offset, $limit";
My question is am I doing something wrong here? Do you have anytips on making a smart search work? This is the only way I was taught where you match the user input to something in the database.
Thanks in advance.
I am searching titles in an article database.
I have two titles:
mouse cleaning
and
cleaning your computer
Now If I do a search for "cleaning mouse" I get 0 results. If I do "cleaning computer' I get 0 results. But If I do mouse cleaning, mouse, cleaning your,I get the articles.
This is my query from a simple form input. The form value is called "search_value"
$query = "SELECT id,title, post, DATE_FORMAT(date,'%M %D, %Y') AS date FROM article WHERE title LIKE '%". $search_value ."%' ORDER BY id DESC LIMIT $offset, $limit";
My question is am I doing something wrong here? Do you have anytips on making a smart search work? This is the only way I was taught where you match the user input to something in the database.
Thanks in advance.