Автор: X11
Дата сообщения: 17.01.2008 22:21
Dronton2, не помогло, я в шоке
вот запрос
Код:
SELECT trek.ID,
trek.ID_TYPE,
trek.ID_RAZDEL,
trek.ID_RUBRIKA,
trek.ID_NAPR,
trek.ID_REGION,
trek.ID_VID,
trek.ID_AGENCY,
trek.ID_FILIAL,
trek.INPUT_DATE,
trek.LCD,
trek.TEXT,
trek.START_PUBLIC,
trek.EXPIREDATE,
trek.PN,
trek.VT,
trek.SR,
trek.CH,
trek.PT,
trek.SB,
trek.VS,
trek.IPADDRESS,
trek.PHONE,
trc.rcount as EXPORT_COUNT,
trek.START_PUBLIC,
trc.LAST_DATE_EXPORT,
ttyp.NAME as TYPE_NAME,
traz.NAME as RAZDEL_NAME,
trub.NAME as RUBRIKA_NAME,
tnap.NAME as NAPR_NAME,
treg.NAME as REGION_NAME,
tvid.NAME as VID_NAME,
trek.USER_NAME as USER_NAME,
tage.NAME as AGENCY_NAME,
tfil.name as filial_name,
trek.id2,
trek.deleted
FROM TREKLAMA trek
left join TTYPE ttyp on (ttyp.id = trek.ID_TYPE)
left join TRAZDEL traz on (traz.id = trek.ID_RAZDEL)
left join TRUBRIKA trub on (trub.id = trek.ID_RUBRIKA)
left join TNAPR tnap on (tnap.id = trek.ID_NAPR)
left join TREGION treg on (treg.id = trek.ID_REGION)
left join TVID tvid on (tvid.id = trek.ID_VID)
left join TAGENCY tage on (tage.id = trek.ID_AGENCY)
left join TFILIALS tfil on (tfil.id = trek.ID_FILIAL)
left join treclamacount trc on (trc.id_reklama = trek.id)