SELECT prodotti.titolo_ru AS titolo_prodotto, categorie.titolo_ru AS titolo_categoria, file.id, file.titolo_ru AS titolo, file.img, preview FROM web_file AS file LEFT JOIN web_file_categorie AS categorie ON file.categoria = categorie.id LEFT JOIN modelli AS modelli ON modelli.id = file.id_art WHERE modelli.catalogo=1 and modelli.status=1 and file.status=1 AND file.tabella='modelli' AND (file.categoria = '') ORDER BY file.ordine, file.id DESC SELECT prodotti.titolo_ru AS titolo_prodotto, categorie.titolo_ru AS titolo_categoria, file.id, file.titolo_ru AS titolo, file.img, preview FROM web_file AS file LEFT JOIN web_file_categorie AS categorie ON file.categoria = categorie.id LEFT JOIN modelli AS modelli ON modelli.id = file.id_art WHERE modelli.catalogo=1 and modelli.status=1 and file.status=1 AND file.tabella='modelli' AND (file.categoria = '') ORDER BY file.ordine DESC, file.id DESC LIMIT 0, 32