exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Locality.pre_id' in 'on clause'' in /home/users/hotel/hotel.cz/git/lib/Zend/Db/Statement/Pdo.php:228 Stack trace: #0 /home/users/hotel/hotel.cz/git/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) #1 /home/users/hotel/hotel.cz/git/lib/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array) #2 /home/users/hotel/hotel.cz/git/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #3 /home/users/hotel/hotel.cz/git/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT p.pac_id...', Array) #4 /home/users/hotel/hotel.cz/git/lib/Zend/Db/Adapter/Abstract.php(737): Zend_Db_Adapter_Pdo_Abstract->query('SELECT p.pac_id...', Array) #5 /home/users/hotel/hotel.cz/git/app/models/BaseModel.php(91): Zend_Db_Adapter_Abstract->fetchAll('SELECT p.pac_id...', Array) #6 /home/users/hotel/hotel.cz/git/app/models/Abstract/Getter.php(476): BaseModel->fetchAllCached('SELECT p.pac_id...', Array, '9edeb84ac477ea0...', Array) #7 /home/users/hotel/hotel.cz/git/app/controllers/silvestrturistikcz/IndexController.php(69): Abstract_Getter->getData() #8 /home/users/hotel/hotel.cz/git/lib/Zend/Controller/Action.php(516): Silvestrturistikcz_IndexController->indexAction() #9 /home/users/hotel/hotel.cz/git/lib/Zend/Controller/Dispatcher/Standard.php(309): Zend_Controller_Action->dispatch('indexAction') #10 /home/users/hotel/hotel.cz/git/lib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #11 /home/users/hotel/hotel.cz/git/lib/Zend/Application/Bootstrap/Bootstrap.php(101): Zend_Controller_Front->dispatch() #12 /home/users/hotel/hotel.cz/git/lib/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() #13 /home/users/hotel/hotel.cz/git/www/index.php(43): Zend_Application->run() #14 {main} Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Locality.pre_id' in 'on clause', query was: SELECT p.pac_id, p.pre_id, p.hot_id, p.pac_seo, p.pac_note, p.pac_includes, p.pac_nights, p.gal_id, p.mea_id, p.prm_id, p.pac_arrivalDays, p.pac_status, p.pac_mountains, p.spa_id, p.pac_homepage, p.pac_imageCount, h.hot_name, h.hot_seoName, h.hot_class, h.cur_id_default, h.hot_gpsLatitude, h.hot_gpsLongitude, h.hoy_id, htype.hoy_name, t.`tow_id`, t.`tow_seo`, IF(trtown.`tra_translation` IS NULL, t.`tow_name`, trtown.`tra_translation`) AS tow_name, IF(translation.`tra_translation` IS NULL, IF(translationEn.`tra_translation` IS NULL, p.`pac_description`, translationEn.`tra_translation`), translation.`tra_translation`) AS pac_description, IF(translation.`tra_translation` IS NULL, 0, 1) AS descriptionTranslated, IF(translationName.`tra_translation` IS NULL, IF(translationNameEn.`tra_translation` IS NULL, p.`pac_name`, translationNameEn.`tra_translation`), translationName.`tra_translation`) AS pac_name, IF(translationName.`tra_translation` IS NULL, 0, 1) AS nameTranslated, IF(translationNote.`tra_translation` IS NULL, IF(translationNoteEn.`tra_translation` IS NULL, p.`pac_note`, translationNoteEn.`tra_translation`), translationNote.`tra_translation`) AS pac_note, IF(translationNote.`tra_translation` IS NULL, 0, 1) AS noteTranslated, IF(translationIncludes.`tra_translation` IS NULL, IF(translationIncludesEn.`tra_translation` IS NULL, p.`pac_includes`, translationIncludesEn.`tra_translation`), translationIncludes.`tra_translation`) AS pac_includes, IF(translationIncludes.`tra_translation` IS NULL, 0, 1) AS includesTranslated, (SELECT (IF(1 = pach.prm_id, (prices.`pap_price` * IF(rates.rat_rate IS NULL, 1, IF(pach.spa_id > 0, rates.spa_rate, rates.rat_rate))), (prices.`pap_price` * IF(rates.rat_rate IS NULL, 1, IF(pach.spa_id > 0, rates.spa_rate, rates.rat_rate)) / IF(ok.obk_numOfBeds IS NULL, 1, ok.obk_numOfBeds)))) as sum FROM `PackageSeason` season LEFT JOIN Package pach ON pach.pac_id = season.pac_id LEFT JOIN `ObjectKind` ok ON ok.obk_id = (SELECT o.obk_id FROM `ObjectKind` o LEFT JOIN `PackagePrices` p ON p.obk_id = o.obk_id LEFT JOIN `PackageSeason` ps ON p.`pac_id` = ps.`pac_id` AND p.`pas_id` = ps.`pas_id` AND CURDATE() BETWEEN ps.`pas_from` AND ps.`pas_to` WHERE p.pac_id = season.pac_id ORDER BY p.`pap_price` ASC LIMIT 0,1) LEFT JOIN `PackagePrices` prices ON season.`pas_id` = prices.`pas_id` AND prices.`pac_id` = season.pac_id AND IF(ok.obk_id IS NULL, prices.obk_id = 0, prices.`obk_id` = ok.obk_id) LEFT JOIN Hotel ph ON pach.pre_id = ph.pre_id AND pach.hot_id = ph.hot_id LEFT JOIN `Rates` rates ON rates.cur_id = ph.`cur_id_default` WHERE season.`pac_id` = p.pac_id ORDER BY sum ASC, DATEDIFF(:arrival, season.pas_from) LIMIT 0,1) as basePrice, (SELECT (IF(1 = pach.prm_id, (prices.`pap_standartPrice` * IF(rates.rat_rate IS NULL, 1, IF(pach.spa_id > 0, rates.spa_rate, rates.rat_rate))), (prices.`pap_standartPrice` * IF(rates.rat_rate IS NULL, 1, IF(pach.spa_id > 0, rates.spa_rate, rates.rat_rate)) / IF(ok.obk_numOfBeds IS NULL, 1, ok.obk_numOfBeds)))) as sum FROM `PackageSeason` season LEFT JOIN Package pach ON pach.pac_id = season.pac_id LEFT JOIN `ObjectKind` ok ON ok.obk_id = (SELECT o.obk_id FROM `ObjectKind` o LEFT JOIN `PackagePrices` p ON p.obk_id = o.obk_id LEFT JOIN `PackageSeason` ps ON p.`pac_id` = ps.`pac_id` AND p.`pas_id` = ps.`pas_id` AND CURDATE() BETWEEN ps.`pas_from` AND ps.`pas_to` WHERE p.pac_id = season.pac_id ORDER BY p.`pap_standartPrice` ASC LIMIT 0,1) LEFT JOIN `PackagePrices` prices ON season.`pas_id` = prices.`pas_id` AND prices.`pac_id` = season.pac_id AND IF(ok.obk_id IS NULL, prices.obk_id = 0, prices.`obk_id` = ok.obk_id) LEFT JOIN Hotel ph ON pach.pre_id = ph.pre_id AND pach.hot_id = ph.hot_id LEFT JOIN `Rates` rates ON rates.cur_id = ph.`cur_id_default` WHERE season.`pac_id` = p.pac_id ORDER BY sum ASC, DATEDIFF(:arrival, season.pas_from) LIMIT 0,1) as basePriceStandart, (SELECT CONCAT(DATE_FORMAT(season.pas_from,'%d.%m. %Y'), ' - ', DATE_FORMAT(season.pas_to,'%d.%m. %Y')) as nearestSeason FROM `PackageSeason` season LEFT JOIN Package pach ON pach.pac_id = season.pac_id LEFT JOIN `ObjectKind` ok ON ok.obk_id = (SELECT o.obk_id FROM `ObjectKind` o LEFT JOIN `PackagePrices` p ON p.obk_id = o.obk_id LEFT JOIN `PackageSeason` ps ON p.`pac_id` = ps.`pac_id` AND p.`pas_id` = ps.`pas_id` AND CURDATE() BETWEEN ps.`pas_from` AND ps.`pas_to` WHERE p.pac_id = season.pac_id ORDER BY p.`pap_price` ASC LIMIT 0,1) LEFT JOIN `PackagePrices` prices ON season.`pas_id` = prices.`pas_id` AND prices.`pac_id` = season.pac_id AND IF(ok.obk_id IS NULL, prices.obk_id = 0, prices.`obk_id` = ok.obk_id) LEFT JOIN Hotel ph ON pach.pre_id = ph.pre_id AND pach.hot_id = ph.hot_id LEFT JOIN `Rates` rates ON rates.cur_id = ph.`cur_id_default` WHERE season.`pac_id` = p.pac_id ORDER BY season.pas_from ASC, DATEDIFF(:arrival, season.pas_from) LIMIT 0,1) as season, photo.`pho_id` AS photoId, photo.`pho_name` AS photoName, photo.`pho_hdd` AS photoHdd, CONCAT_WS('/', photo.php_id, photo.pho_pairId, IF(photo.pho_hdd <> '', photo.pho_hdd, CONCAT(photo.pho_id, RIGHT(photo.pho_name, LOCATE('.', REVERSE(photo.pho_name)))))) AS photo, (SELECT MIN(`PackagePrices`.`pap_price`) FROM PackagePrices WHERE PackagePrices.pac_id = p.pac_id) as minPrice , Locality.lct_name, Locality.lct_seo, h.hot_street, p.pac_nights as datediff, PackageSeason.pas_from, PackageSeason.pas_to FROM `Package` p LEFT JOIN `Hotel` h ON p.`pre_id` = h.`pre_id` AND p.`hot_id` = h.`hot_id` LEFT JOIN `HotelType` htype ON h.`hoy_id` = htype.`hoy_id` LEFT JOIN Town t ON h.tow_id = t.tow_id LEFT JOIN Translation trtown ON trtown.`tra_rowid` = h.`tow_id` AND trtown.`tco_id` = '23' AND trtown.`lan_id` = :lanId AND trtown.`pro_id` = 1 LEFT JOIN Translation translation ON p.`pac_id` = translation.`tra_rowid` AND translation.pre_id = h.`pre_id` AND translation.`tco_id` = '33' AND translation.`lan_id` = :lanId AND translation.`pro_id` = 1 LEFT JOIN Translation translationEn ON p.`pac_id` = translationEn.`tra_rowid` AND translationEn.pre_id = h.`pre_id` AND translationEn.`tco_id` = '33' AND translationEn.`lan_id` = 2 AND translationEn.`pro_id` = 1 LEFT JOIN Translation translationName ON p.`pac_id` = translationName.`tra_rowid` AND translationName.pre_id = h.`pre_id` AND translationName.`tco_id` = '34' AND translationName.`lan_id` = :lanId AND translationName.`pro_id` = 1 LEFT JOIN Translation translationNameEn ON p.`pac_id` = translationNameEn.`tra_rowid` AND translationNameEn.pre_id = h.`pre_id` AND translationNameEn.`tco_id` = '34' AND translationNameEn.`lan_id` = 2 AND translationNameEn.`pro_id` = 1 LEFT JOIN Translation translationNote ON p.`pac_id` = translationNote.`tra_rowid` AND translationNote.pre_id = h.`pre_id` AND translationNote.`tco_id` = '35' AND translationNote.`lan_id` = :lanId AND translationNote.`pro_id` = 1 LEFT JOIN Translation translationNoteEn ON p.`pac_id` = translationNoteEn.`tra_rowid` AND translationNoteEn.pre_id = h.`pre_id` AND translationNoteEn.`tco_id` = '35' AND translationNoteEn.`lan_id` = 2 AND translationNoteEn.`pro_id` = 1 LEFT JOIN Translation translationIncludes ON p.`pac_id` = translationIncludes.`tra_rowid` AND translationIncludes.pre_id = h.`pre_id` AND translationIncludes.`tco_id` = '36' AND translationIncludes.`lan_id` = :lanId AND translationIncludes.`pro_id` = 1 LEFT JOIN Translation translationIncludesEn ON p.`pac_id` = translationIncludesEn.`tra_rowid` AND translationIncludesEn.pre_id = h.`pre_id` AND translationIncludesEn.`tco_id` = '36' AND translationIncludesEn.`lan_id` = 2 AND translationIncludesEn.`pro_id` = 1 INNER JOIN Package_Project pproject ON p.`pac_id` = pproject.`pac_id` AND pproject.pro_id = 18 LEFT JOIN `Photos` photo ON photo.`pho_pairId` = h.`hot_id` AND photo.`php_id` = '1' AND photo.`obk_id` = '0' JOIN Locality ON `Locality`.`lct_id` = `h`.`lct_id` AND Locality.pre_id = h.pre_id LEFT JOIN PackageSeason ON p.`pac_id` = PackageSeason.`pac_id` WHERE `p`.`pac_id` IN (22714) GROUP BY h.`hot_id`' in /home/users/hotel/hotel.cz/git/lib/Zend/Db/Statement/Pdo.php:235 Stack trace: #0 /home/users/hotel/hotel.cz/git/lib/Zend/Db/Statement.php(303): Zend_Db_Statement_Pdo->_execute(Array) #1 /home/users/hotel/hotel.cz/git/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #2 /home/users/hotel/hotel.cz/git/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT p.pac_id...', Array) #3 /home/users/hotel/hotel.cz/git/lib/Zend/Db/Adapter/Abstract.php(737): Zend_Db_Adapter_Pdo_Abstract->query('SELECT p.pac_id...', Array) #4 /home/users/hotel/hotel.cz/git/app/models/BaseModel.php(91): Zend_Db_Adapter_Abstract->fetchAll('SELECT p.pac_id...', Array) #5 /home/users/hotel/hotel.cz/git/app/models/Abstract/Getter.php(476): BaseModel->fetchAllCached('SELECT p.pac_id...', Array, '9edeb84ac477ea0...', Array) #6 /home/users/hotel/hotel.cz/git/app/controllers/silvestrturistikcz/IndexController.php(69): Abstract_Getter->getData() #7 /home/users/hotel/hotel.cz/git/lib/Zend/Controller/Action.php(516): Silvestrturistikcz_IndexController->indexAction() #8 /home/users/hotel/hotel.cz/git/lib/Zend/Controller/Dispatcher/Standard.php(309): Zend_Controller_Action->dispatch('indexAction') #9 /home/users/hotel/hotel.cz/git/lib/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #10 /home/users/hotel/hotel.cz/git/lib/Zend/Application/Bootstrap/Bootstrap.php(101): Zend_Controller_Front->dispatch() #11 /home/users/hotel/hotel.cz/git/lib/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() #12 /home/users/hotel/hotel.cz/git/www/index.php(43): Zend_Application->run() #13 {main} link: http://silvestr.turistik.cz/ ip: 54.161.185.244