Very odd problem here. If I search for the word "monster" for example, it will find everything in the database where that word appears. But if I type in "cyclone", of which there is just one product, it won't find it.
That word is in the "title" field of the database for a product, but it won't find it. On the other hand, if I type in one word from another product, it WILL find it.
Can anyone shed any light on why this might be happening, or if they have come across this oddity before.
Code: Select all
if(isset($_POST['search']))
{
$search = $_POST['search'];
$_SESSION['search']=$search;
}
$result = mysql_query ("SELECT * FROM products WHERE pause = 'off' AND title LIKE '%$search%' OR description LIKE '%$search%' OR id = '$search' LIMIT $offset, $rowsPerPage") or die (mysql_error());