I am trying to check 2 columns for a particular pattern.
Here is the query in the code:
The error I get:PHP Code:
$query = "SELECT * FROM pages WHERE title LIKE '%$v%' OR desc LIKE '%$v%'";
I need to check the same columns, well actually 3 columns, all for the same variable value.Query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc LIKE '%testsearch%'' at line 1
If I take out the OR and thereafter, it works, but I need that.
Any ideas?