object(mysqli_result)#6 (5) { ["current_field"]=> int(0) ["field_count"]=> int(111) ["lengths"]=> NULL ["num_rows"]=> int(1) ["type"]=> int(0) } string(6772) " SELECT M.mainCategory, M.category, M.eponymia_en AS eponymia, M.title_en AS title, M.area, M.description_en AS description, M.address_en AS address, M.POCode, M.phone, M.fax, M.cellPhone, M.isCellVisible, M.email, M.website, M.website2, M.logo, M.pointX, M.pointY, M.hasReservationForm, M.reservationFormRoom, M.responsible_en AS responsible, M.responsiblePhone, M.videoActive, M.videoThumb, ( M.offerActive AND NOW() < M.couponEndDate ) AS offerActive, M.offerImage, M.offerText, M.multiColorEnabled, M.counter, M.hasEnglish, M.hasl1, M.hasl2, M.hasl3, M.hasl4, M.couponURL, M.eshopService, M.eshopSubdomain, M.analytics, M.hasSubdomainImageTemplate, M.subdomainTemplateID, M.subdomainBGImage, M.templateNextUpdate, IF( M.templateNextUpdate > NOW(), 0, 1 ) AS multiTemplateEnded, IF( M.templateNextUpdate > NOW() - INTERVAL 30 DAY, 1, 0 ) AS multiTemplateIconShow, M.is_exclusive, M.subdomain_path_el, M.subdomain_path_en, M.subdomain_path_l1, M.subdomain_path_l2, M.subdomain_path_l3, M.subdomain_path_l4, M.eotcode, M.pdfFileService, M.pdfFileSubdomainTitle_en AS pdfFileSubdomainTitle, M.isSubdomainMenuDisplayed, M.subdomainMoreTitle_en AS subdomainMoreTitle, M.slideshowStatus, M.slideshowMaxNumImages, M.bgSlideshowStatus, M.bgSlideshowMaxNumImages, M.sbdmSrvActive, M.sbdmSrvTitle_en AS sbdmSrvTitle, M.sbdmSrv1_en AS sbdmSrv1, M.sbdmSrv2_en AS sbdmSrv2, M.sbdmSrv3_en AS sbdmSrv3, M.sbdmSrv4_en AS sbdmSrv4, M.sbdmSrv5_en AS sbdmSrv5, M.sbdmSrv6_en AS sbdmSrv6, M.sbdmSrv7_en AS sbdmSrv7, M.sbdmSrv8_en AS sbdmSrv8, M.isKerasma, M.page_title_en AS pageTitle, M.page_description_en AS pageDescription, M.page_keywords_en AS pageKeywords, M.google_plus, M.youtube AS video, M.barring_service, M.phone_red_dot, M.card_state, M.exclusive_expire, IF ( M.exclusive_expire >= NOW() OR M.is_exclusive = 0, 0, 1 ) AS exclusiveExpired, M.reseller_id, IF ( M.card_expiration_date IS NULL, 0, IF ( M.card_expiration_date >= NOW(), 0, 1 ) ) AS cardExpired, M.articlesLimit, M.articlesLimitHomePage, M.couponDiscountPrice, M.couponIsDiscount, M.offerImage, M.offerText, M.couponEndDate, M.couponCode, C.value_en AS main_category, CAT.value_en AS category_name, M.numImages, ( SELECT JSON_ARRAYAGG( JSON_OBJECT( 'id', MPF.id, 'pdfFile', MPF.pdfFile_en, 'pdfFileTitle', MPF.pdfFileTitle_en, 'pdfFileLinkTitle', MPF.pdfFileLinkTitle_en, 'pdfIcon', MPF.pdfIcon_en, 'pdfIconAlt', MPF.pdfIconAlt_en, 'sortPos', CASE WHEN MPF.position > 0 THEN MPF.position WHEN MPF.position < 0 THEN ABS(MPF.position) ELSE NULL END, 'catPos', CASE WHEN MPF.position > 0 THEN 1 WHEN MPF.position < 0 THEN 3 ELSE 2 END, 'pdfDescription', MPF.pdf_desc_en ) ORDER BY CASE WHEN MPF.position > 0 THEN 1 WHEN MPF.position < 0 THEN 3 ELSE 2 END, CASE WHEN MPF.position > 0 THEN MPF.position WHEN MPF.position < 0 THEN ABS(MPF.position) ELSE NULL END, MPF.pdfFileTitle_en ) FROM merchant_pdf_files AS MPF WHERE MPF.merchant = M.id ) AS pdf_files, A.value_en AS area_name, PA.value_en AS parent_area_name, ( SELECT JSON_ARRAYAGG(MK.keyword) FROM merchant_keywords AS MK WHERE MK.merchant = M.id ) AS keywords, ( SELECT JSON_ARRAYAGG( JSON_OBJECT( 'image', MI.image, 'title', MI.title_en, 'description', MI.description_en ) ORDER BY MI.position ) FROM merchant_images AS MI WHERE MI.merchant = M.id ) AS images, COALESCE(MTS.layout, DEFST.layout) AS subdomainTemplateLayout, CASE WHEN COALESCE(MTS.type, DEFST.type) = 'photo' AND IFNULL(M.subdomainBGImage, '') = '' THEN DEFST.type ELSE COALESCE(MTS.type, DEFST.type) END AS subdomainTemplateType, CASE WHEN COALESCE(MTS.type, DEFST.type) = 'photo' AND IFNULL(M.subdomainBGImage, '') = '' THEN DEFST.code ELSE COALESCE(MTS.code, DEFST.code) END AS subdomainTemplate, IF( M.bgSlideshowStatus = 1 AND M.multiColorEnabled = 1 AND M.templateNextUpdate > NOW() AND M.hasSubdomainImageTemplate = 1, ( SELECT JSON_ARRAYAGG( JSON_OBJECT( 'image', bg.image, 'title', bg.title, 'description', bg.description, 'url', bg.url, 'open_new_window', bg.open_new_window ) ) FROM ( SELECT image, title_en AS title, description_en AS description, url_en AS url, open_new_window, ROW_NUMBER() OVER (ORDER BY position) AS rn FROM subdomain_bgslideshows WHERE merchantID = 7876 ) AS bg WHERE bg.rn <= M.bgSlideshowMaxNumImages ), NULL ) AS bgslides, RS.reseller_id, RS.logo AS reseller_logo, RS.url AS reseller_url, RS.email AS reseller_email, MS.composite_contact_form_display_dates, ( SELECT translation FROM translation_strings WHERE table_id = 97 AND field_id = 98 AND row_id = M.id AND language_id = 1 LIMIT 1 ) AS room_types_title, ( SELECT JSON_ARRAYAGG( JSON_OBJECT( 'id', CRFRT.id, 'position', CRFRT.position, 'name', (SELECT translation FROM translation_strings WHERE table_id = 99 AND field_id = 100 AND language_id = 1 AND row_id = CRFRT.id LIMIT 1), 'value', (SELECT translation FROM translation_strings WHERE table_id = 99 AND field_id = 101 AND language_id = 1 AND row_id = CRFRT.id LIMIT 1) ) ORDER BY CRFRT.position ) FROM composite_reservation_form_room_types AS CRFRT WHERE CRFRT.merchant_id = M.id ) AS room_types, F.uri AS favicon_uri FROM merchants AS M LEFT JOIN categories AS C ON C.id = M.mainCategory LEFT JOIN categories AS CAT ON CAT.id = M.category LEFT JOIN areas AS A ON A.id = M.area LEFT JOIN areas AS PA ON PA.id = A.parentArea LEFT JOIN subdomain_templates AS MTS ON MTS.id = M.subdomainTemplateID LEFT JOIN subdomain_templates AS DEFST ON DEFST.id = 1 LEFT JOIN reseller_settings AS RS ON RS.reseller_id = M.reseller_id LEFT JOIN merchant_services AS MS ON MS.merchant_id = M.id LEFT JOIN favicons AS F ON F.id = M.favicon_id WHERE M.id = 7876; "