SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
at line 151 in file classes/db/DbPDO.php
146. protected function _query($sql)
147. {
148. try {
149. return $this->link->query($sql);
150. } catch (\PDOException $exception) {
151. throw new PrestaShopException($exception->getMessage(), (int) $exception->getCode(), $exception);
152. }
153. }
154.
155. /**
156. * Returns the next row from the result set.
372. {
373. if ($sql instanceof DbQuery) {
374. $sql = $sql->build();
375. }
376.
377. $this->result = $this->_query($sql);
378.
379. if (!$this->result && $this->getNumberError() == 2006) {
380. $this->connect();
381. $this->result = $this->_query($sql);
382. }
Argument [0] SELECT * FROM `pr_zbl_parts` p join pr_zbl_car_part cp on p.code_1 = cp.code_1 and cp.type_id = 9953
609. || stripos($sql, 'dumpfile') !== false
610. ) {
611. throw new PrestaShopDatabaseException('Db->executeS() must be used only with select, show, explain or describe queries');
612. }
613.
614. $this->result = $this->query($sql);
615.
616. if (!$this->result) {
617. $result = false;
618. } else {
619. if (!$array) {
Argument [0] SELECT * FROM `pr_zbl_parts` p join pr_zbl_car_part cp on p.code_1 = cp.code_1 and cp.type_id = 9953
71. //$this->context->smarty->tpl_vars['meta_title']->value('elenco dei ricambi auto ');
72. $current_url = "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
73.
74. //Ora i pezzi
75. $pezzi = [];
76. $results = Db::getInstance()->executeS("SELECT * FROM `pr_zbl_parts` p join pr_zbl_car_part cp on p.code_1 = cp.code_1 and cp.type_id = ".pSQL($id));
77. $lastName = '';
78. foreach($results as $item) {
79. $sql = "select p.id_product,pc.id_category from pr_product p join pr_category_product pc on p.id_product = pc.id_product where reference = '".pSQL($item['code_1'])."' and active = 1 and pc.id_category != 1308";
80.
81. if (is_numeric($id_cat)) $sql.= " and pc.id_category = ".$id_cat;
Argument [0] SELECT * FROM `pr_zbl_parts` p join pr_zbl_car_part cp on p.code_1 = cp.code_1 and cp.type_id = 9953
314. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
315. $this->initHeader();
316. }
317.
318. if ($this->viewAccess()) {
319. $this->initContent();
320. } else {
321. $this->errors[] = $this->trans('Access denied.', [], 'Admin.Notifications.Error');
322. }
323.
324. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
505.
506. // Execute hook dispatcher
507. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
508.
509. // Running controller
510. $controller->run();
511.
512. // Execute hook dispatcher after
513. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
514. } catch (PrestaShopException $e) {
515. $e->displayMessage();
23. * @copyright Since 2007 PrestaShop SA and Contributors
24. * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25. */
26.
27. require dirname(__FILE__).'/config/config.inc.php';
28. Dispatcher::getInstance()->dispatch();