The response from API is not formated:
Database Error

A Database Error Occurred

Error Number: 1054

Unknown column 'QTC_Items_Seasons_Periods.Inactive' in 'where clause'

SELECT `QTC_Items`.`Id`, `QTC_Items`.`Active`, `QTC_Items`.`TypeId`, COALESCE(`QTC_Items_Types_Translations`.`Name`, `QTC_Items_Types`.`Name`, '') AS `TypeName`, `QTC_Items`.`TransportType`, `QTC_Items`.`DepartureCityCode`, COALESCE(`DepartureCitiesTranslation`.`CityName`, `DepartureCities`.`CityName`, '') AS `DepartureCity`, `QTC_Items`.`DestinationCityCode`, COALESCE(`DestinationCitiesTranslation`.`CityName`, `DestinationCities`.`CityName`, '') AS `DestinationCity`, `QTC_Items`.`HotelCode`, `QTC_Items_Rates`.`OrderNo`, COALESCE(`QTC_Hotels_Translations`.`Name`, `QTC_Hotels`.`Name`, '') AS `HotelName`, COALESCE(`QTC_Hotels`.`Stars`, '') AS `HotelStars`, COALESCE(`QTC_Hotels`.`Address`, '') AS `HotelAddress`, COALESCE(`QTC_Hotels_Translations`.`Location`, `QTC_Hotels`.`Location`, '') AS `HotelLocation`, COALESCE(`QTC_Hotels_Translations`.`LocationDescription`, `QTC_Hotels`.`LocationDescription`, '') AS `HotelLocationDescription`, COALESCE(`QTC_Hotels_Translations`.`ShortDescription`, `QTC_Hotels`.`ShortDescription`, '') AS `HotelShortDescription`, COALESCE(`QTC_Hotels_Translations`.`LongDescription`, `QTC_Hotels`.`LongDescription`, '') AS `HotelLongDescription`, `QTC_Items`.`CanBeSoldIndependently`, `QTC_Items`.`CanBeSoldWithHotel`, `QTC_Items`.`Code`, COALESCE(`QTC_Items_Translations`.`Title`, `QTC_Items`.`Title`) AS `Title`, COALESCE(`QTC_Items_Translations`.`Subtitle`, `QTC_Items`.`Subtitle`, '') AS `Subtitle`, COALESCE(`QTC_Items_Translations`.`ShortDescription`, `QTC_Items`.`ShortDescription`, '') AS `ShortDescription`, COALESCE(`QTC_Items_Translations`.`LongDescription`, `QTC_Items`.`LongDescription`, '') AS `LongDescription`, COALESCE(`QTC_Items_Translations`.`MetaKeywords`, `QTC_Items`.`MetaKeywords`, '') AS `MetaKeywords`, COALESCE(`QTC_Items_Translations`.`MetaDescription`, `QTC_Items`.`MetaDescription`, '') AS `MetaDescription`, `QTC_Items_Rates`.`Id` AS `ItemRateId`, COALESCE(`QTC_Items_Services_Translations`.`Name`, `QTC_Items_Services`.`Name`, '') AS `ItemRateServiceName`, COALESCE(`QTC_Items_Rates`.`Details`, '') AS `ItemRateDetails`, COALESCE(`QTC_Items_Services`.`Type`, '') AS `ItemRateServiceType`, `QTC_Items_Rates`.`NoOfAdults`, `QTC_Items_Rates`.`NoOfChildren`, `QTC_Items_Rates`.`Child1AgeMin`, `QTC_Items_Rates`.`Child1AgeMax`, `QTC_Items_Rates`.`Child2AgeMin`, `QTC_Items_Rates`.`Child2AgeMax`, `QTC_Items_Rates`.`DayNo`, ABS(DATEDIFF(`QTC_Items_Seasons_Periods`.`BeginDate`, `QTC_Items_Seasons_Periods`.`EndDate`)) AS `NightsInRate`, IF(`QTC_Items_Rates`.`DayNo` = -1, COALESCE((MIN(`QTC_Items_Rates`.`SupplierRate`) + MIN(`QTC_Items_Rates`.`Commission`)), 0), COALESCE(((MIN(`QTC_Items_Rates`.`SupplierRate`) + MIN(`QTC_Items_Rates`.`Commission`)) ) ,0)) AS `Total`, `QTC_Items_Rates`.`Currency`, IF(`QTC_Items_Rates`.`PromoCheck` = 1 ,IF(`QTC_Items_Rates`.`DayNo` = -1, COALESCE((MAX(`QTC_Items_Rates`.`PromoOldSupplierRate`) + MAX(`QTC_Items_Rates`.`PromoOldCommission`)), 0), COALESCE(((MAX(`QTC_Items_Rates`.`PromoOldSupplierRate`) + MAX(`QTC_Items_Rates`.`PromoOldCommission`)) ) ,0)), '') AS `OldTotal`, `QTC_Items_Rates`.`Promo`, `QTC_Items_Rates`.`PromoCheck`, COALESCE((SELECT GROUP_CONCAT(DISTINCT '', `QTC_Items_Seasons_Periods`.`BeginDate`, '||', `QTC_Items_Seasons_Periods`.`EndDate`, '||', `QTC_Items_Seasons`.`Code`, '||', `QTC_Items_Seasons`.`Name`, '' ORDER BY `QTC_Items_Seasons_Periods`.`BeginDate`, `QTC_Items_Seasons_Periods`.`EndDate` SEPARATOR '') FROM `QTravelCloudOnlineIBE_92`.`QTC_Items_Seasons_Periods` LEFT JOIN `QTravelCloudOnlineIBE_92`.`QTC_Items_Seasons` ON `QTC_Items_Seasons_Periods`.`SeasonId` = `QTC_Items_Seasons`.`Id` AND `QTC_Items_Seasons`.`Deleted` = 0 WHERE `QTC_Items_Seasons_Periods`.`SeasonId` = `QTC_Items_Rates`.`SeasonId` AND `QTC_Items_Seasons_Periods`.`Deleted` = 0 AND COALESCE(`QTC_Items_Seasons_Periods`.`Inactive`, 0) = 0), '') AS `Periods`, (SELECT CONCAT('', GROUP_CONCAT('' SEPARATOR ''), '' ) FROM `QTravelCloud`.`QTC_Custom_Fields` LEFT JOIN `QTravelCloud`.`QTC_Custom_Fields_Values` ON `QTC_Custom_Fields_Values`.`CustomFieldId` = `QTC_Custom_Fields`.`Id` AND `QTC_Custom_Fields_Values`.`Deleted` = 0 WHERE `QTC_Custom_Fields`.`Deleted` = 0 AND `QTC_Custom_Fields`.`AccountId` = 92 AND `QTC_Custom_Fields`.`Table` = 'QTC_Items' AND `QTC_Custom_Fields_Values`.`TableId` = `QTC_Items`.`Id` ) AS `CustomFields` FROM `QTravelCloudOnlineIBE_92`.`QTC_Items` INNER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Items_Seasons` ON `QTC_Items_Seasons`.`ItemId` = `QTC_Items`.`Id` AND `QTC_Items_Seasons`.`Deleted` = 0 INNER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Items_Seasons_Periods` ON `QTC_Items_Seasons_Periods`.`SeasonId` = `QTC_Items_Seasons`.`Id` AND `QTC_Items_Seasons_Periods`.`Deleted` = 0 INNER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Items_Rates` ON `QTC_Items_Rates`.`ItemId` = `QTC_Items`.`Id` AND `QTC_Items_Rates`.`SeasonId` = `QTC_Items_Seasons`.`Id` AND `QTC_Items_Rates`.`Deleted` = 0 INNER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Items_Services` ON `QTC_Items_Services`.`Id` = `QTC_Items_Rates`.`ItemServiceId` AND `QTC_Items_Services`.`Deleted` = 0 LEFT OUTER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Items_Types` ON `QTC_Items_Types`.`Id` = `QTC_Items`.`TypeId` LEFT OUTER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Hotels` ON `QTC_Hotels`.`HotelCode` = `QTC_Items`.`HotelCode` LEFT OUTER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Destinations_Cities` AS `DepartureCities` ON `DepartureCities`.`CityCode` = `QTC_Items`.`DepartureCityCode` LEFT OUTER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Destinations_Cities` AS `DestinationCities` ON `DestinationCities`.`CityCode` = `QTC_Items`.`DestinationCityCode` LEFT OUTER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Items_Translations` ON `QTC_Items_Translations`.`ItemId` = `QTC_Items`.`Id` AND `QTC_Items_Translations`.`Language` = 'en' AND `QTC_Items_Translations`.`Deleted` = 0 LEFT OUTER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Items_Types_Translations` ON `QTC_Items_Types_Translations`.`TypeId` = `QTC_Items_Types`.`Id` AND `QTC_Items_Types_Translations`.`Language` = 'en' AND `QTC_Items_Types_Translations`.`Deleted` = 0 LEFT OUTER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Items_Services_Translations` ON `QTC_Items_Services_Translations`.`ServiceId` = `QTC_Items_Services`.`Id` AND `QTC_Items_Services_Translations`.`Language` = 'en' AND `QTC_Items_Services_Translations`.`Deleted` = 0 LEFT OUTER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Destinations_Cities_Translations` AS `DepartureCitiesTranslation` ON `DepartureCitiesTranslation`.`CityId` = `DepartureCities`.`Id` AND `DepartureCitiesTranslation`.`Language` = 'en' AND `DepartureCitiesTranslation`.`Deleted` = 0 LEFT OUTER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Destinations_Cities_Translations` AS `DestinationCitiesTranslation` ON `DestinationCitiesTranslation`.`CityId` = `DestinationCities`.`Id` AND `DestinationCitiesTranslation`.`Language` = 'en' AND `DestinationCitiesTranslation`.`Deleted` = 0 LEFT OUTER JOIN `QTravelCloudOnlineIBE_92`.`QTC_Hotels_Translations` ON `QTC_Hotels_Translations`.`HotelId` = `QTC_Hotels`.`Id` AND `QTC_Hotels_Translations`.`Language` = 'en' AND `QTC_Hotels_Translations`.`Deleted` = 0 WHERE `QTC_Items`.`Deleted` = 0 AND `QTC_Items`.`CanBeSoldIndependently` = 1 AND `QTC_Items`.`Active` = 1 AND `QTC_Items_Rates`.`Deleted` = 0 AND `QTC_Items_Rates`.`ValabilityBeginDate` <= NOW() AND `QTC_Items_Rates`.`ValabilityEndDate` >= NOW() AND `QTC_Items`.`Code` = 'ke-htt-ken' GROUP BY `QTC_Items`.`Id`, COALESCE(`QTC_Items_Services_Translations`.`Name`, `QTC_Items_Services`.`Name`, ''), `QTC_Items_Rates`.`NoOfAdults`, `QTC_Items_Rates`.`NoOfChildren`, `QTC_Items_Rates`.`Child1AgeMin`, `QTC_Items_Rates`.`Child1AgeMax`, `QTC_Items_Rates`.`Child2AgeMin`, `QTC_Items_Rates`.`Child2AgeMax`, `QTC_Items_Rates`.`Currency`, ABS(DATEDIFF(`QTC_Items_Seasons_Periods`.`BeginDate`, `QTC_Items_Seasons_Periods`.`EndDate`)), `QTC_Items_Rates`.`SupplierRate`, `QTC_Items_Rates`.`Commission`, `QTC_Items_Rates`.`PromoOldSupplierRate`, `QTC_Items_Rates`.`PromoOldCommission` ORDER BY `QTC_Items_Rates`.`OrderNo`, `QTC_Items_Rates`.`SupplierRate`

Filename: /var/www/html/qtravelcloud.com/backoffice/core/MY_Model.php

Line Number: 20