SELECT
ds_unique_name, cd_ext
FROM
t_allegati
WHERE
cd_tbl = 't_news'
AND id_t_tbl =
AND cd_type = 'NUM_1'
ORDER BY
id_t_allegati.|. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND cd_type = 'NUM_1'
ORDER BY
id_t_allegati' at line 8