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 makale.makaleid<>164 order by str_to_date(updatedate, '%d/%m/%Y') desc' at line 1