DB function failed with error number 1064
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 a.name DESC LIMIT 0, 10' at line 1 SQL=SELECT a.id,a.name, c.title, a.attachement , c.description as cat_desc FROM ormc_document_list as a,ormc_categories as c WHERE a.category = c.id and a.state = 1 and a.category = ORDER BY a.name DESC LIMIT 0, 10no records !!!