I have a mysql query like this.
SELECT item FROM items WHERE catid=3 AND tag LIKE '%".$tag[1]."%' OR tag LIKE '%".$tag[2]"%' LIMIT 4
How can I tell mysql to search item those have tag LIKE '%".$tag[1]."%'
first, before it continue the search process to find items those have tag LIKE '%".$tag[2]."%'
. Because right now it looks like mysql randomly choose what condition to execute. Sometimes it displays 4 results that all are match tag LIKE '%".$tag[2]."%'
which is I don't want to. I want mysql to prioritize tag LIKE '%".$tag[1]."%'
first.