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 ')
ORDER BY g_hit DESC
LIMIT 4' at line 6
SELECT g_id,g_folder,g_idnum,g_name,g_hit
FROM cdb_data
WHERE g_id != '12465'
AND g_open = '1'
AND g_type NOT IN (1,3)
AND ()
ORDER BY g_hit DESC
LIMIT 4