I have looked all over the internet for an answer to my question to why my sql statement returns false. I checked it out on the sql validator over at mimer and all I got was that I used the reserved word name. There should be something in my database that matches this so here it is:
Here is how I create the sql statement:
$title = 'SELECT * FROM item, categories WHERE item.title
LIKE "%'.implode('%" OR item.title LIKE "%', $data).'%"'.'
AND categories.name = '.$category;
And this is the result:
SELECT * FROM item, categories WHERE item.title LIKE "%hello%"
OR item.title LIKE "%world%" OR item.title
LIKE "%Joomla%" OR item.title LIKE "%Animal%" AND categories.name = Book