majorcode Posted April 11, 2020 Share Posted April 11, 2020 (edited) Hello members, I moved my whole site from one domain to another. Everything is working perfect except when I click on Customers>Customers I received the following error Bad SQL query Table 'XXXXX_XXX.ps_connections' doesn't exist Kindly help to fix this issue. Thank you Edited April 11, 2020 by majorcode typing error (see edit history) Link to comment Share on other sites More sharing options...
joseantgv Posted April 11, 2020 Share Posted April 11, 2020 Table ps_connections doesn't exist. The migration from one server to another has not been successful. You'd better export/import database again. Link to comment Share on other sites More sharing options...
majorcode Posted April 12, 2020 Author Share Posted April 12, 2020 23 hours ago, joseantgv said: Table ps_connections doesn't exist. The migration from one server to another has not been successful. You'd better export/import database again. Hello Jose, any other solution as I really worked on the website for more than 2 months. I am afraid to do some bigger mess. No worries about old data, how i can fix it without re import/export. Advise please! Link to comment Share on other sites More sharing options...
Prescol Posted April 12, 2020 Share Posted April 12, 2020 In PhpMyAdmin export the table structure for xx_connections table. Not content, only structure. Then in your production database import that table. Link to comment Share on other sites More sharing options...
majorcode Posted April 13, 2020 Author Share Posted April 13, 2020 16 hours ago, Prescol said: In PhpMyAdmin export the table structure for xx_connections table. Not content, only structure. Then in your production database import that table. Thank you Prescol, can I just re-create the table? Since its been two month I am adding products into my shop therefore I am afraid not to do any big mess. Link to comment Share on other sites More sharing options...
Prescol Posted April 13, 2020 Share Posted April 13, 2020 Table connections is not important. It is only for analytics, so you can create it empty and nothing happens 1 Link to comment Share on other sites More sharing options...
majorcode Posted April 14, 2020 Author Share Posted April 14, 2020 Thank you prescol, just curious, will that analytics will help later as I will do SEO for my shop Link to comment Share on other sites More sharing options...
joseantgv Posted April 14, 2020 Share Posted April 14, 2020 hace 20 minutos, majorcode dijo: Thank you prescol, just curious, will that analytics will help later as I will do SEO for my shop You will use Google Analytics or another service, not PS data. 1 Link to comment Share on other sites More sharing options...
Prescol Posted April 14, 2020 Share Posted April 14, 2020 (edited) Prestashop analytics was a good thing back when every analytics were a paid service. Since Google Analytics, as joseantgv says, it has no really sense to keep them enabled. Disabling them can even increase performance on your site. Edited April 15, 2020 by Prescol wrong english. (see edit history) 1 1 Link to comment Share on other sites More sharing options...
majorcode Posted April 16, 2020 Author Share Posted April 16, 2020 Thank you Prescol and joseantgv Link to comment Share on other sites More sharing options...
Rizzzle Posted June 30, 2021 Share Posted June 30, 2021 This happened to me from a fresh install. It is important to see customers shopping carts I think, so perhaps could do with a fix. Link to comment Share on other sites More sharing options...
Rizzzle Posted June 30, 2021 Share Posted June 30, 2021 When I click on "Customers" or "Shopping Carts" PS 1.7.7.4 An exception occurred while executing 'SELECT c.id_customer, c.firstname, c.lastname, c.email, c.active, c.newsletter, c.optin, c.date_add, gl.name as social_title, s.name as shop_name, c.company, (SELECT SUM(total_paid_real / conversion_rate) FROM ps_orders o WHERE (o.id_customer = c.id_customer) AND (o.id_shop IN (?)) AND (o.valid = 1)) as total_spent, (SELECT con.date_add FROM ps_guest g LEFT JOIN ps_connections con ON con.id_guest = g.id_guest WHERE g.id_customer = c.id_customer ORDER BY con.date_add DESC LIMIT 1) as connect FROM ps_customer c LEFT JOIN ps_gender_lang gl ON c.id_gender = gl.id_gender AND gl.id_lang = ? LEFT JOIN ps_shop s ON c.id_shop = s.id_shop WHERE (c.deleted = 0) AND (c.id_shop IN (?)) ORDER BY c.date_add DESC LIMIT 50' with params [1, 1, 1]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'XXX_XXXX.ps_connections' doesn't exist [Doctrine\DBAL\Exception\TableNotFoundException 0] Link to comment Share on other sites More sharing options...
joseantgv Posted June 30, 2021 Share Posted June 30, 2021 Table 'XXX_XXXX.ps_connections' doesn't exist Something went wrong with the installation. I recommend you to install it again. Link to comment Share on other sites More sharing options...
Rizzzle Posted June 30, 2021 Share Posted June 30, 2021 Shop seems to be working fine though other than this. That'll be a lot of time wasted Link to comment Share on other sites More sharing options...
joseantgv Posted July 2, 2021 Share Posted July 2, 2021 Then execute this query: CREATE TABLE `ps_connections` ( `id_connections` int(10) unsigned NOT NULL AUTO_INCREMENT, `id_shop_group` int(11) unsigned NOT NULL DEFAULT 1, `id_shop` int(11) unsigned NOT NULL DEFAULT 1, `id_guest` int(10) unsigned NOT NULL, `id_page` int(10) unsigned NOT NULL, `ip_address` bigint(20) DEFAULT NULL, `date_add` datetime NOT NULL, `http_referer` varchar(255) DEFAULT NULL, PRIMARY KEY (`id_connections`), KEY `id_guest` (`id_guest`), KEY `date_add` (`date_add`), KEY `id_page` (`id_page`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; 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