$Sql = "SELECT c.ID_CAT ,c.title,c.description,c.filename,c.total,f.ID_CAT,f.ID_FILE,f.title as filetitle,f.date FROM $prefix AS c LEFT JOIN $prefix1 AS f ON ( c.ID_CAT=f.ID_CAT) GROUP BY c.ID_CAT order by c.ID_CAT DESC,f.ID_FILE DESC limit 0,$list ";