TDbException

Description

TDbCommand failed to execute the query SQL "SELECT sale.property_value AS is_sale, p.*, pf.src image, pd.title, pd.title_main, pd.short_description, pd.description FROM shop_products p LEFT JOIN shop_product_details pd ON (p.id_product = pd.id_product) LEFT JOIN shop_product_files pf ON (p.id_product=pf.id_product AND pf.img_type='main_front' AND type='img') LEFT JOIN shop_product_categories pc ON (p.id_category=pc.id_category) LEFT JOIN shop_property_to_product sptp ON (p.id_product=sptp.id_product AND sptp.id_p_property = '14') LEFT JOIN shop_property_to_product bestsellers ON (p.id_product=bestsellers.id_product AND bestsellers.id_p_property = '26') LEFT JOIN shop_property_to_product sale ON (p.id_product=sale.id_product AND sale.id_p_property = '27') WHERE pd.lang='1' AND p.trash!='y' ORDER BY `orderby` ASC, `id_product` ASC LIMIT 40 OFFSET 0": SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

Source File

/__jelly.com.pl/framework_3_1_10/Data/TDbCommand.php (230)

0219:         try
0220:         {
0221:             // Prado::trace('Query: '.$this->getDebugStatementText(), 'System.Data');
0222:             if($this->_statement instanceof PDOStatement)
0223:                 $this->_statement->execute();
0224:             else
0225:                 $this->_statement=$this->getConnection()->getPdoInstance()->query($this->getText());
0226:             return new TDbDataReader($this);
0227:         }
0228:         catch(Exception $e)
0229:         {
0230: throw new TDbException('dbcommand_query_failed',$e->getMessage(),$this->getDebugStatementText());
0231: } 0232: } 0233: 0234: /** 0235: * Executes the SQL statement and returns the first row of the result. 0236: * This is a convenient method of {@link query} when only the first row of data is needed. 0237: * @param boolean whether the row should be returned as an associated array with 0238: * column names as the keys or the array keys are column indexes (0-based). 0239: * @return array the first row of the query result, false if no result. 0240: * @throws TDbException execution failed 0241: */ 0242: public function queryRow($fetchAssociative=true)

Stack Trace

#0 /__jelly.com.pl/framework_3_1_10/Data/DataGateway/TDataGatewayCommand.php(304): TDbCommand->query()
#1 /__jelly.com.pl/framework_3_1_10/Data/ActiveRecord/TActiveRecordGateway.php(247): TDataGatewayCommand->findAllBySql(Object(TActiveRecordCriteria))
#2 /__jelly.com.pl/framework_3_1_10/Data/ActiveRecord/TActiveRecord.php(678): TActiveRecordGateway->findRecordsBySql(Object(ShopProductsRecord), Object(TActiveRecordCriteria))
#3 /__jelly.com.pl/protected/Pages/Products.php(565): TActiveRecord->findAllBySql('SELECT\n\t\t\t\t\tsal...')
#4 /__jelly.com.pl/protected/Pages/Products.php(246): Products->getProducts(NULL, NULL, NULL, NULL, NULL, NULL)
#5 /__jelly.com.pl/framework_3_1_10/pradolite.php(4199): Products->onInit(NULL)
#6 /__jelly.com.pl/framework_3_1_10/pradolite.php(5570): TControl->initRecursive(NULL)
#7 /__jelly.com.pl/framework_3_1_10/pradolite.php(5686): TCompositeControl->initRecursive(NULL)
#8 /__jelly.com.pl/framework_3_1_10/pradolite.php(6220): TTemplateControl->initRecursive()
#9 /__jelly.com.pl/framework_3_1_10/pradolite.php(6215): TPage->processNormalRequest(Object(THtmlWriter))
#10 /__jelly.com.pl/framework_3_1_10/pradolite.php(8340): TPage->run(Object(THtmlWriter))
#11 /__jelly.com.pl/framework_3_1_10/pradolite.php(8306): TPageService->runPage(Object(Products), Array)
#12 /__jelly.com.pl/framework_3_1_10/pradolite.php(9297): TPageService->run()
#13 /__jelly.com.pl/framework_3_1_10/pradolite.php(8899): TApplication->runService()
#14 /__jelly.com.pl/index.php(48): TApplication->run()
#15 {main}
2021-06-18 02:30 IdeaWebServer/2.1.0 (like Apache) PRADO/3.1.10