get() SELECT articles.*, autori.*, (case when articles.a_title LIKE '%cladire mixta'%' then 1 else 0 end) + (case when articles.a_keywords LIKE '%cladire mixta'%' then 0.8 else 0 end) + (case when articles.a_text LIKE '%cladire mixta'%' then 0.6 else 0 end) + (case when autori.autor_nume LIKE '%cladire mixta'%' then 0.2 else 0 end) as weight FROM articles, autori WHERE articles.autor_id_fk=autori.autor_id AND ((articles.a_date IS NOT NULL && articles.a_date<=NOW())) AND(articles.a_title LIKE "%cladire mixta'%" OR articles.a_keywords LIKE "%cladire mixta'%" OR articles.a_text LIKE "%cladire mixta'%" OR autori.autor_nume LIKE "%cladire mixta'%" ) AND articles.a_type LIKE "FREE" ORDER BY weight DESC, articles.a_date DESC, articles.a_id DESC LIMIT 0,18
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 '%' then 1 else 0 end) + (case when articles.a_keywords LIKE '%cladire m' at line 2