I've been trying to select the status of doing a LIKE
comparison:
SELECT (`my_column` LIKE '%thepattern'%) AS `did_match`
Thanks!
Edit: Just to clarify this was used so I could get this:
SELECT
(CASE WHEN `title` LIKE '%keyword%' THEN 20 ELSE 0 END) +
(CASE WHEN `desc` LIKE '%keyword%' THEN 10 ELSE 0 END)
AS `match`
FROM myTable
ORDER BY `match`