Kirin Posted October 8, 2013 Share Posted October 8, 2013 Good evening guys. I need a query that deletes every order in prestashop (both imported and not) that has been made before a certain date (for example before october). Can you please help me? Link to comment Share on other sites More sharing options...
vekia Posted October 8, 2013 Share Posted October 8, 2013 simple example: delete from ps_orders where date_add < "2013-10-01" Link to comment Share on other sites More sharing options...
Kirin Posted October 8, 2013 Author Share Posted October 8, 2013 Thank you vekia, thank you very much. Link to comment Share on other sites More sharing options...
Totti Posted October 8, 2013 Share Posted October 8, 2013 o cancel orders should not delete them also in the other tables ? Link to comment Share on other sites More sharing options...
vekia Posted October 8, 2013 Share Posted October 8, 2013 yes, it is necessary, but if mysql databse is based on "innoDB" engine, then data from these tables should be removed automatically (ON UPDATE / ON DELETE CASCADE option) 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