I\'m trying to make a simple search bar that searches through my database for certain words. It is possible to use the LIKE attribute without using WHERE? I want it to sear
You might want to look at the MATCH() function as well eg:
SELECT * FROM shoutbox
WHERE MATCH(`name`, `foo`, `bar`) AGAINST ('$search')
You can also add boolean mode to this:
SELECT * FROM shoutbox
WHERE MATCH(`name`, `foo`, `bar`) AGAINST ('$search') IN BOOLEAN MODE
You can also get the relevance scores and add FULLTEXT keys to speed up the queries.