SELECT m.id , c.id AS cid, c.name AS author, m.subject, m.url100,m.city_url, m.time, m.podrazdel, m.podrubrika, m.podrubrika2, m.podrubrika3, m.message, m.foto1, c.tarif, m.cf_id, m.dosection_id, m.time_order, c.city, m.region_id, c.cfoblast_id FROM metalnew_companies c, metalnew_board_building m, metalnew_companies_section s, metalnew_company_sections t WHERE s.cf_id=c.id AND t.id=s.cfsection_id AND t.numrazdel=4 AND s.cfsection_id=m.podrazdel AND c.tarif=0.5 AND m.accepted='yes' AND m.delete='no' AND c.id=m.cf_id ORDER BY tarif ASC,m.time_order DESC, m.id