SQL:SELECT *, (+(CASE WHEN cloud LIKE '%sale%' THEN 1 ELSE 0 END)+(CASE WHEN cloud LIKE '%lasithi%' THEN 1 ELSE 0 END)) AS relevance FROM properties WHERE AND (cloud LIKE '%sale%') AND (cloud LIKE '%lasithi%') AND munic LIKE 'for sale lasithi%' AND cloud LIKE '% %' ORDER BY pid DESC
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND (cloud LIKE '%sale%') AND (cloud LIKE '%lasithi%') AND munic LIKE 'for sale ' at line 1