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 authtitle.id=titles.id AND titles.status=1 AND titles.instock > 0 and authti' at line 1