I am generating the below query as part of our system:
SELECT * FROM (`videos`) WHERE (
`videos`.`title` LIKE "%apple%"
OR WHERE
`videos`.`byline` LIKE "%apple%"
OR WHERE `videos`.`description` LIKE "%apple%"
);
However, this is throwing a syntax error.
So, what’s up?
Note that I need the brackets as those three where‘s are linked, often followed by separate AND WHERE‘s
Sql statements use single quotes around literal values. Also only one where clause is needed in this case. Simply use one where clause and then use
orto connect the predicates. The script also has some parenthesis that are not required.The final result looks like: