I\'m working on an \'advanced search\' page on a site where you would enter a keyword such as \'I like apples\' and it can search the database using the following options:
You could use
With at least one of the words
SELECT * FROM myTable WHERE field LIKE '%$keyword%' or field LIKE '%$keyword2%' or field LIKE '%$keyword3%';
Without the word
SELECT * FROM myTable WHERE field NOT LIKE '%$keyword%';