Hey guys!
I've made a PHP script that searches things in my mysql database but it doesn't work how I would like it to work...
For example I have a mysql database that has fields like: id, title, link etc..
I'm searching in the title field.
I'm guessing that the problem is coming from my mysql_query so here's the code for it:
For example if I have a title like this : Ferrari 599 GTB Fiorano by Novitec and I search for ferrari it works fine, if I search for ferrari 599 it works fine BUT if I search for ferrari GTB it doesn't return any results... So it seems like it only finds words that are near each other and in the same order as they are in the title.... How could I make it return the correct result?
Thanks,
Vlad
I've made a PHP script that searches things in my mysql database but it doesn't work how I would like it to work...
For example I have a mysql database that has fields like: id, title, link etc..
I'm searching in the title field.
I'm guessing that the problem is coming from my mysql_query so here's the code for it:
PHP:
$result = mysql_query("SELECT * FROM `$table` WHERE title LIKE '%$keyword%' ");
For example if I have a title like this : Ferrari 599 GTB Fiorano by Novitec and I search for ferrari it works fine, if I search for ferrari 599 it works fine BUT if I search for ferrari GTB it doesn't return any results... So it seems like it only finds words that are near each other and in the same order as they are in the title.... How could I make it return the correct result?
Thanks,
Vlad







