string(227) "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 's_holiday2017.html' LIKE rule_ecd WHEN rule_ecd_case = 'NOT LIKE' THEN 'new_ye' at line 68" array(1) { [0]=> array(6) { ["file"]=> string(47) "/var/www/vhosts/appleple.com/httpdocs/index.php" ["line"]=> int(1311) ["function"]=> string(5) "query" ["class"]=> string(2) "DB" ["object"]=> object(DB)#2 (3) { ["_connection"]=> resource(29) of type (mysql link) ["_fetch"]=> NULL ["_dsn"]=> array(3) { ["type"]=> string(5) "mysql" ["debug"]=> bool(true) ["charset"]=> string(5) "UTF-8" } } ["type"]=> string(2) "->" } } Fatal error: 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 's_holiday2017.html' LIKE rule_ecd WHEN rule_ecd_case = 'NOT LIKE' THEN 'new_ye' at line 68
SELECT *
 FROM acms2013_rule
 LEFT JOIN acms2013_blog ON blog_id = rule_blog_id
 
 WHERE 1
  AND rule_status = 'open'
  AND blog_left <= 4
  AND blog_right >= 5
  AND ( 0
  OR rule_blog_id = 3
  OR rule_scope = 'global'
  )
  AND 
 CASE
  WHEN rule_aid_case IS NULL  THEN 1
  WHEN rule_aid_case = 'IS NULL' THEN 1
  WHEN rule_aid_case = 'IS NOT NULL' THEN 0
  ELSE 0
 END
  AND 
 CASE
  WHEN rule_uid_case IS NULL  THEN 1
  WHEN rule_uid_case = 'IS NULL' THEN 1
  WHEN rule_uid_case = 'IS NOT NULL' THEN 0
  ELSE 0
 END
  AND 
 CASE
  WHEN rule_cid_case IS NULL  THEN 1
  WHEN rule_cid_case = 'IS NULL' THEN 1
  WHEN rule_cid_case = 'IS NOT NULL' THEN 0
  ELSE 0
 END
  AND 
 CASE
  WHEN rule_eid_case IS NULL  THEN 1
  WHEN rule_eid_case = 'IS NULL' THEN 0
  WHEN rule_eid_case = 'IS NOT NUL in /var/www/vhosts/appleple.com/httpdocs/php/DB.php on line 178