Jump to content

Multiple Database Exception Errors


lfeppp

Recommended Posts

Hello,

 

am suddenly unable to access the 'Dashboard' page for my PrestaShop, due to the following errors:

 

Incorrect date value: '0000-00-00' for column 'stats_compare_from' at row 1

UPDATE `ps_employee` SET `id_employee` = '1',`lastname` = 'Lee',`firstname` = 'Samuel',`email` = '[email protected]',`id_lang` = '1',`passwd` = '14fa7dedd064200796f8737fe3c4bf5d',`last_passwd_gen` = '2019-06-03 18:27:19',`active` = '1',`optin` = '1',`id_profile` = '1',`bo_color` = '',`default_tab` = '1',`bo_theme` = 'default',`bo_css` = 'admin-theme.css',`bo_width` = '0',`bo_menu` = '1',`stats_date_from` = '2020-04-01',`stats_date_to` = '2020-04-19',`stats_compare_from` = '0000-00-00',`stats_compare_to` = '0000-00-00',`stats_compare_option` = '1',`preselect_date_range` = 'month',`id_last_order` = '9479',`id_last_customer_message` = '3336',`id_last_customer` = '374' WHERE `id_employee` = 1

 

at line 765 in file classes/db/Db.php

 

760.                   WebserviceRequest::getInstance()->setError(500, '

 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);


761.           }

762.           elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))

763.           {

764.                   if ($sql)

765.                          throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');

766.

767.                   throw new PrestaShopDatabaseException($this->getMsgError());

768.           }

769.    }

770.

 

 

DbCore->update - [line 628 - classes/ObjectModel.php] - [5 Arguments]

 

623.                   $id_shop_list = $this->id_shop_list;

624.

625.           if (Shop::checkIdShopDefault($this->def['table']) && !$this->id_shop_default)

626.                   $this->id_shop_default = (in_array(Configuration::get('PS_SHOP_DEFAULT'), $id_shop_list) == true) ? Configuration::get('PS_SHOP_DEFAULT') : min($id_shop_list);

627.           // Database update

628.           if (!$result = Db::getInstance()->update($this->def['table'], $this->getFields(), '`'.pSQL($this->def['primary']).'` = '.(int)$this->id, 0, $null_values))

629.                   return false;

630.

631.           // Database insertion for multishop fields related to the object

632.           if (Shop::isTableAssociated($this->def['table']))

633.           {

 

 

how in the world do i fix these?

 

thank you in advance for your help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...