SELECT c2.text_name as text_name, TRIM(CONCAT(IFNULL(g.text_name,''),' ',IFNULL(m.text_name,''))) as metro, to2.text_name as typeobj, c2.text_name as title, c2.text_plo as plosh, c2.text_price as price, c2.text_pricem as pricem, c2.id as id, CONCAT('/object2/',c2.id,'.htm') as url, c2.img_img1 as img_img1, c2.ord as ord FROM nedv_ru_catalog2 c2 LEFT JOIN nedv_ru_gorod g ON g.id=c2.select_gorod LEFT JOIN nedv_ru_metro m ON m.id=c2.select_metro LEFT JOIN nedv_ru_typeobj2 to2 ON to2.id=c2.select_typeobj2 WHERE c2.check_active=1 and c2.check_end=1 and c2.parent=links794687.php order by ord descError SQL