Jump to content

MySQL command - Showing/Cleaning guest carts (id_customer = 0)


JSSSX

Recommended Posts

Hello, 

 

I am often using this command to delete the unused carts from non customers : 

DELETE FROM `ps_cart` WHERE `id_customer` = 0

 

Always working fine.

 

 

Anyway I wanted to show the status of this table/column before cleaning but using : 

SHOW TABLE STATUS FROM `ps_cart` WHERE `id_customer` = 0

 

It drops me #1054 - Unknown column 'id_customer' in 'where clause'

 

What would be the correct syntax to show id_customer status using SHOW TABLE STATUS ?

 

 

Thanks.

Edited by JSSSX (see edit history)
Link to comment
Share on other sites

Show table status is used to display the status of tables, it is not used to display data of a specific table.

 

SHOW TABLE STATUS FROM YourStoreDBName like '%cart%';

 

If you want to show the data of the cart table, please use

SELECT  * FROM ps_cart  WHERE id_customer = 0
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...