recNum 20 SELECT SQL_CALC_FOUND_ROWS DISTINCT a.`Message_ID`, a.`User_ID`, a.`IP`, a.`UserAgent`, a.`LastUser_ID`, a.`LastIP`, a.`LastUserAgent`, a.`Priority`, a.`Parent_Message_ID`, a.`ncTitle`, a.`ncKeywords`, a.`ncDescription`, a.`ncSMO_Title`, a.`ncSMO_Description`, a.`ncSMO_Image`, sub.`Subdivision_ID`, CONCAT('', sub.`Hidden_URL`) AS `Hidden_URL`, cc.`Sub_Class_ID`, cc.`EnglishName`, a.`Checked`, a.`Created`, a.`Keyword`, a.`LastUpdated` + 0 AS `LastUpdated`, a.`Name`, a.`Vendor`, a.`Article`, a.`Image`, a.`PriceDiscount`, a.`Price`, a.`StockUnits`, a.`ItemID`, a.`Size`, a.`base_id`, a.`FullDescription`, tbl598.`dating_Name` AS `dating`, tbl598.`dating_ID` AS `dating_id`, tbl598.`Value` AS `dating_value` , tbl598.`CustomSettings` AS `dating_settings` , tbl599.`Sex_Name` AS `sex`, tbl599.`Sex_ID` AS `sex_id`, tbl599.`Value` AS `sex_value` , tbl599.`CustomSettings` AS `sex_settings` , a.`Stock`, a.`novelty`, a.`mainGroup`, a.`VariantName`, tbl745.`ShopCurrency_Name` AS `Currency`, tbl745.`ShopCurrency_ID` AS `Currency_id`, tbl745.`Value` AS `Currency_value` , tbl745.`CustomSettings` AS `Currency_settings` , a.`ImportSourceID`, tbl747.`ShopUnits_Name` AS `Units`, tbl747.`ShopUnits_ID` AS `Units_id`, tbl747.`Value` AS `Units_value` , tbl747.`CustomSettings` AS `Units_settings` , a.`VAT`, a.`density`
FROM (`Message258` AS a ) LEFT JOIN `Subdivision` AS `sub` ON sub.`Subdivision_ID` = a.`Subdivision_ID`
LEFT JOIN `Sub_Class` AS `cc` ON cc.`Sub_Class_ID` = a.`Sub_Class_ID` LEFT JOIN `Classificator_dating` AS `tbl598` ON a.`dating` = tbl598.`dating_ID` LEFT JOIN `Classificator_Sex` AS `tbl599` ON a.`sex` = tbl599.`Sex_ID` LEFT JOIN `Classificator_ShopCurrency` AS `tbl745` ON a.`Currency` = tbl745.`ShopCurrency_ID` LEFT JOIN `Classificator_ShopUnits` AS `tbl747` ON a.`Units` = tbl747.`ShopUnits_ID` LEFT JOIN `Directory_structure` AS str ON a.`Message_ID` = str.`Message_ID`
WHERE (1 AND a.`Parent_Message_ID` = '0' AND str.ID_sub_site = '393' AND a.StockUnits > 0 AND a.mainGroup = '0' AND sub.`Catalogue_ID` = '1' AND a.`Checked` = 1 ) ORDER BY a.`Name` ASC, a.`Size` ASC LIMIT 80, 20
Нужна помощь?Оставьте свои контакты и наши менеджеры ответят на любые ваши вопросы!