Array
(
[active] => 1
[type] => service
)
Array
(
[get] => Array
(
[SQL] => SELECT
t1.id as theID, t1.typeID, t1.categoryID, t1.areaID, t1.sort, t1.latitude, t1.longitude, t1.prevPic, t1.mainPic,
t1.title, t1.prevText, t1.mainText, t1.eventDate, t1.active, t1.popular, t1.is_new, t1.incomplete, t1.rateAmount,
t1.voteQuantity, t1.authorID, t1.cagID, t1.publDate, t1.created, t1.edited,
t1.*, t2.category as category, t2.categoryTitle AS categoryTitle, t3.type as type, t3.typeTitle as typeTitle, t4.areaTitle as areaTitle, t5.addr,
t6.path AS prevPicPath, CONCAT('https://visitmo.ru/img/nodes/', t1.id, '.jpg') AS prevPicPath_,
COALESCE(( SELECT fieldText FROM iblock_field WHERE blockID = t1.id AND fieldID = 15 ), 0) AS welcome_child,
COALESCE(( SELECT fieldText FROM iblock_field WHERE blockID = t1.id AND fieldID = 18 ), 0) AS welcome_animals,
COALESCE(( SELECT fieldText FROM iblock_field WHERE blockID = t1.id AND fieldID = 20 ), 0) AS welcome_invalids,
t4.region_id as region_id, t7.groupID, t8.groupTitle, t8.groupAlt, t9.authorName,
t10.cag_id, t10.ca_name, dateTypeLabel(t1.eventDate) as evDateLabel, getRouteLength(t1.id) AS routeDays, t11.path as mainPicPath,
(SELECT id FROM routes WHERE blockID = t1.id ORDER BY id ASC LIMIT 1) AS routeID,
(SELECT COUNT(id) FROM routes WHERE blockID = t1.id) AS atRoute
, ft_0.field_price AS field_price, ft_1.field_bassein AS field_bassein
FROM
iblocks AS t1
LEFT JOIN (SELECT id, altname as category, title AS categoryTitle FROM iblockCategories) AS t2 ON t1.categoryID = t2.id
LEFT JOIN (SELECT id, altname as type, title AS typeTitle FROM iblockTypes) AS t3 ON t1.typeID = t3.id
LEFT JOIN (SELECT id, title as areaTitle, regionID as region_id FROM areas) AS t4 ON t1.areaID = t4.id
LEFT JOIN (SELECT blockID, fieldText AS addr FROM iblock_field WHERE fieldID = (SELECT id FROM iblockFields WHERE altname = 'address') ) AS t5 ON t1.id = t5.blockID
LEFT JOIN (SELECT * FROM files) AS t6 ON t6.id = t1.prevPic
LEFT JOIN (SELECT * FROM files) AS t11 ON t11.id = t1.mainPic
LEFT JOIN iblock_group AS t7 ON t7.blockID = t1.id
LEFT JOIN ( SELECT id, title as groupTitle, altname as groupAlt FROM iblockGroups ) AS t8 ON t8.id = t7.groupID
LEFT JOIN (SELECT ID as u_ID, CAG_ID as u_cagID, CONCAT(LAST_NAME, ' ', NAME) AS authorName FROM user) AS t9 ON t9.u_ID = t1.authorID
LEFT JOIN ( SELECT id as cag_id, title as ca_name FROM counteragent ) AS t10 ON t10.cag_id = t9.u_cagID
LEFT JOIN (SELECT blockID, fieldText AS field_price FROM iblock_field WHERE fieldID = (SELECT id FROM iblockFields WHERE altname = 'price')) AS ft_0 ON t1.id = ft_0.blockID
LEFT JOIN (SELECT blockID, fieldText AS field_bassein FROM iblock_field WHERE fieldID = (SELECT id FROM iblockFields WHERE altname = 'bassein')) AS ft_1 ON t1.id = ft_1.blockID
WHERE active = '1' AND `publDate` <= CURRENT_DATE() AND `incomplete` = 0 AND type = 'service'
GROUP BY t1.id
ORDER BY sort ASC, publDate DESC, (rateAmount / voteQuantity) DESC LIMIT 0, 16
[error] =>
)
)