polishchuk.i
Знаток
- Регистрация
- 28 Авг 2014
- Сообщения
- 169
- Реакции
- 29
Такое видел в tdqueryДоброго вечера всем.Ребята подскажите пожалуйста такой вопрос-за вкладку "Применимость к моделям авто" какая таблица в базе данных отвечает? Модуль версии 3.2.4.....
static public function GetApplicability($ART_ID, $LNG_ID = TDM_LANG_ID)
{
$SQL = "SELECT TYP_ID, MOD_ID, MFA_BRAND, "
. "DES_TEXTS7.TEX_TEXT AS MOD_CDS_TEXT, "
. "DES_TEXTS.TEX_TEXT AS TYP_CDS_TEXT, "
. "TYP_PCON_START, TYP_PCON_END, TYP_CCM, TYP_KW_FROM, TYP_HP_FROM, TYP_CYLINDERS, ENGINES.ENG_CODE, "
. "DES_TEXTS3.TEX_TEXT AS TYP_FUEL_DES_TEXT, " . "IFNULL(DES_TEXTS4.TEX_TEXT, DES_TEXTS5.TEX_TEXT) AS TYP_BODY_DES_TEXT "
. "FROM LINK_ART " . "INNER JOIN LINK_LA_TYP ON LAT_LA_ID = LA_ID " . "INNER JOIN TYPES ON TYP_ID = LAT_TYP_ID "
. "INNER JOIN COUNTRY_DESIGNATIONS ON COUNTRY_DESIGNATIONS.CDS_ID = TYP_CDS_ID "
. "INNER JOIN DES_TEXTS ON DES_TEXTS.TEX_ID = COUNTRY_DESIGNATIONS.CDS_TEX_ID "
. "INNER JOIN MODELS ON MOD_ID = TYP_MOD_ID " . "INNER JOIN MANUFACTURERS ON MFA_ID = MOD_MFA_ID "
. "INNER JOIN COUNTRY_DESIGNATIONS AS COUNTRY_DESIGNATIONS2 ON COUNTRY_DESIGNATIONS2.CDS_ID = MOD_CDS_ID "
. "INNER JOIN DES_TEXTS AS DES_TEXTS7 ON DES_TEXTS7.TEX_ID = COUNTRY_DESIGNATIONS2.CDS_TEX_ID "
. "LEFT JOIN DESIGNATIONS ON DESIGNATIONS.DES_ID = TYP_KV_ENGINE_DES_ID "
. "LEFT JOIN DESIGNATIONS AS DESIGNATIONS2 ON DESIGNATIONS2.DES_ID = TYP_KV_FUEL_DES_ID "
. "LEFT JOIN DES_TEXTS AS DES_TEXTS3 ON DES_TEXTS3.TEX_ID = DESIGNATIONS2.DES_TEX_ID "
. "LEFT JOIN LINK_TYP_ENG ON LTE_TYP_ID = TYP_ID " . "LEFT JOIN ENGINES ON ENG_ID = LTE_ENG_ID "
. "LEFT JOIN DESIGNATIONS AS DESIGNATIONS3 ON DESIGNATIONS3.DES_ID = TYP_KV_BODY_DES_ID "
. "LEFT JOIN DES_TEXTS AS DES_TEXTS4 ON DES_TEXTS4.TEX_ID = DESIGNATIONS3.DES_TEX_ID "
. "LEFT JOIN DESIGNATIONS AS DESIGNATIONS4 ON DESIGNATIONS4.DES_ID = TYP_KV_MODEL_DES_ID "
. "LEFT JOIN DES_TEXTS AS DES_TEXTS5 ON DES_TEXTS5.TEX_ID = DESIGNATIONS4.DES_TEX_ID "
. "WHERE " . "LA_ART_ID = " . (int) $ART_ID
. " AND " . "COUNTRY_DESIGNATIONS.CDS_LNG_ID = " . (int) $LNG_ID
. " AND " . "COUNTRY_DESIGNATIONS2.CDS_LNG_ID = " . (int) $LNG_ID
. " AND " . "(DESIGNATIONS.DES_LNG_ID IS NULL OR DESIGNATIONS.DES_LNG_ID = " . (int) $LNG_ID . ") AND "
. "(DESIGNATIONS2.DES_LNG_ID IS NULL OR DESIGNATIONS2.DES_LNG_ID = " . (int) $LNG_ID . ") AND "
. "(DESIGNATIONS3.DES_LNG_ID IS NULL OR DESIGNATIONS3.DES_LNG_ID = " . (int) $LNG_ID . ") AND "
. "(DESIGNATIONS4.DES_LNG_ID IS NULL OR DESIGNATIONS4.DES_LNG_ID = " . (int) $LNG_ID . ") AND "
. "DES_TEXTS.TEX_TEXT NOT LIKE 'ORA-%' " . "ORDER BY MFA_BRAND, MOD_CDS_TEXT, TYP_CDS_TEXT, TYP_PCON_START, TYP_CCM ;";
$resDB = new TDSQLQuery();
$resDB->QuerySelect($SQL);
return $resDB;
}
????????????????????????