btek Posted December 3, 2013 Share Posted December 3, 2013 Hello When I click clients in my back office I have this error. What can I do with this? Please help. Unknown column 'cp.time_end' in 'field list' SELECT c.date_add, COUNT(cp.id_page) AS pages, TIMEDIFF(MAX(cp.time_end), c.date_add) as time, http_referer,INET_NTOA(ip_address) as ipaddress FROM `ps_guest` g LEFT JOIN `ps_connections` c ON c.id_guest = g.id_guest LEFT JOIN `ps_connections_page` cp ON c.id_connections = cp.id_connections WHERE g.`id_customer` = 135 GROUP BY c.`id_connections` ORDER BY c.date_add DESC LIMIT 10at line 613 in file classes/db/Db.php 607. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);608. }609. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))610. {611. if ($sql)612. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');613. throw new PrestaShopDatabaseException($this->getMsgError());614. }615. }616.617. /** DbCore->displayError - [line 313 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 488 - classes/db/Db.php] - [1 Arguments] DbCore->executeS - [line 575 - classes/Customer.php] - [1 Arguments] CustomerCore->getLastConnections - [line 648 - controllers/admin/AdminCustomersController.php] - [0 Argument] AdminCustomersControllerCore->renderView - [line 1495 - classes/controller/AdminController.php] - [0 Argument] AdminControllerCore->initContent - [line 182 - controllers/admin/AdminCustomersController.php] - [0 Argument] AdminCustomersControllerCore->initContent - [line 167 - classes/controller/Controller.php] - [0 Argument] ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument] DispatcherCore->dispatch - [line 53 - admin143/index.php] - [0 Argument] Link to comment Share on other sites More sharing options...
prestamax Posted December 4, 2013 Share Posted December 4, 2013 Seems to be the statistics module. Try to deactivate it and see if the error is gone. Link to comment Share on other sites More sharing options...
btek Posted December 4, 2013 Author Share Posted December 4, 2013 (edited) No not work. I deactivate all statistics modules. I found that when i go to statistics and choice live view : I have this error Unknown column 'cp.time_end' in 'where clause' Now i have deactivated statslive Edited December 4, 2013 by btek (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted December 4, 2013 Share Posted December 4, 2013 try to add this field to ps_guest table in your database should help, error will disappear then Link to comment Share on other sites More sharing options...
btek Posted December 4, 2013 Author Share Posted December 4, 2013 (edited) Hmm I don't have ps_quest table. I must creat it with column cp.time_end? CREATE TABLE ps_quest ( date_add varchar(255), time_end varchar(255), ip_address varchar(255) ); I add this, but not work Edited December 4, 2013 by btek (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted December 4, 2013 Share Posted December 4, 2013 GUEST not quest it's related to statistics ps_guest Link to comment Share on other sites More sharing options...
btek Posted December 4, 2013 Author Share Posted December 4, 2013 (edited) Heh ok I add time_end tinyint(4) Tak NULL date_add tinyint(4) Tak NULL ip_address tinyint(4) Tak NULL but not work, error the same. Everything after upgrade, I have few similar problems. If I repair it, I will be able to fix other problems. Edited December 4, 2013 by btek (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted December 5, 2013 Share Posted December 5, 2013 Install a fresh (local) installation and compare all columns (fields) in all tables with your "broken" shop. Probably the upgrade did not finish successfully. Link to comment Share on other sites More sharing options...
btek Posted December 5, 2013 Author Share Posted December 5, 2013 (edited) I install prestashop and I have the same table and columns in ps_guest. I don't need adding more. I don't know what to do now. When I disable debug mode everythink is fine, but this is't solution. Ok I have solution. In phpmyadmin: ALTER TABLE ps_connections_page ADD time_end DATETIME NULL DEFAULT NULL ; I have't time_end column in ps_connection. Mark as solved. Edited December 5, 2013 by btek (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now