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 `a`.`topic_cn` != '' ORDER BY `a`.`sort_id`' at line 1
SELECT `a`.`id`, `a`.`topic_tw` AS `topic`, `des_tw` as `des`, `detail_tw` as `detail`, `a`.`pic1`, `a`.`pic2`, `a`.`pic3`, `a`.`sort_id` FROM `documents` AS `a` WHERE `a`.`status` = 1 AND `a`.`type` = 0 AND `a`.`id` = AND `a`.`topic_cn` != '' ORDER BY `a`.`sort_id`