error in query: SELECT DISTINCT mag_cat.cat_id, mag_cat.cat_slug, mag_cat.cat_name, mag_cat.cat_sort
FROM mag_cat, mag_to_cat, mag_to_sec
WHERE mag_cat.cat_id = mag_to_cat.cat_id
AND mag_to_cat.art_id = mag_to_sec.art_id
AND mag_to_sec.sec_id =
ORDER BY cat_sort ASC
"
"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 'ORDER BY cat_sort ASC' at line 6