MySQL query error: 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 pred="1" ) AND subdomain="vladivostok" AND id!="5305" ORDER BY datetime ...' at line 1 Query string: SELECT * FROM notice WHERE ( AND pred="1" ) AND subdomain="vladivostok" AND id!="5305" ORDER BY datetime DESC LIMIT 0,3