// 

Введите логин (E-Mail) и пароль
Войти
Забыли пароль?
Отменить
ukrapk
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.date_in DESC LIMIT 0,20' at line 54 SELECT A.name, A.rub, A.sub, A.zag, A.text, A.id, date_format(A.date_in,'%d.%m.%Y %H:%i') AS date_formated, A.type, A.user_type, A.user_id, A.date_out, A.country, A.region, A.city, KF.firm_name as kf_firm_name, KF.translit as kf_translit, KF.date_out as kf_date_out, RG_CO.country as rg_country, RG_R.country as rg_region, RG_CI.country as rg_city, BK_R.kat_name as bk_rub_name, BK_R.translit as bk_rub_translit, BK_S.kat_name as bk_sub_name, BK_S.translit as bk_sub_translit, BK_C.kat_name as bk_city_name, BK_C.translit as bk_city_translit FROM x1_ads A INNER JOIN regions RG_CO ON RG_CO.id = A.country INNER JOIN regions RG_R ON RG_R.id = A.region INNER JOIN regions RG_CI ON RG_CI.id = A.city LEFT JOIN board_kat BK_R ON BK_R.id = A.rub LEFT JOIN board_kat BK_S ON BK_S.id = A.sub LEFT JOIN board_kat BK_C ON BK_C.id = A.city LEFT JOIN katalog_firms KF ON A.user_id = KF.id WHERE A.active = 1 AND A.user_type = '1' AND (A.user_id = '0' OR A.user_id IN ( SELECT _KF.id FROM katalog_firms _KF WHERE _KF.active = '1' AND _KF.date_out > '2017-11-19 19:50:32' ) ) and A.rub= ORDER BY A.date_in DESC LIMIT 0,20