I am building a simple search engine and would like to know how to write a mysql query to search multiple rows:
Example: select * from inventory where item1 or item2 or item3 like "%$variable%";
is this possible or is there another way to do this.
SELECT * FROM inventory WHERE item1 LIKE '%$var%' OR item2 LIKE '%$var%' OR item3 LIKE '%$var%'
Thanks
I have another quick question?
Is it possible to do a search with more than word.
Example: Search for: jack smith
I get no results when I try to search for more then 1 word.