Trying to get a SQL query where you define the value once and it searches multiple columns. I got this working for the equal operator, but I need this for a LIKE operator as well. This is were the problem is.
SELECT *
FROM table1
INNER JOIN table2 ON table2.id = table1.ref_id
WHERE (table1.email, table2.email) LIKE '%[email protected]%'
This is my current query which is not working. Looked at a few other questions online, but those solutions didn't work for me.
How can I search multiple columns for one value with a LIKE operator?