sparh Posted July 5, 2023 Share Posted July 5, 2023 Bonjour, J'aimerai nettoyer ma bas de donnée mais je ne suis pas sur à 100% de mes requêtes et même si j'ai un backup je préfère demander ici avant ce que vous en pensez: Nettoyage mb_connections , ps_connections_source et ps_connections_page DELETE c, cs, cp FROM ps_connections c LEFT JOIN ps_connections_source cs ON (c.id_connections = cs.id_connections) LEFT JOIN ps_connections_page cp ON (c.id_connections = cp.id_connections) WHERE c.date_add < '$date_moins_6_mois' Nettoyage ps_cart et ps_cart_product DELETE c, cp FROM ps_cart c LEFT JOIN ps_cart_product cp ON (c.id_cart = cp.id_cart) WHERE c.date_add < '$date_moins_6_mois' AND c.id_cart not in (SELECT id_cart from ps_orders) Nettoyage ps_guest DELETE g FROM ps_guest g WHERE g.id_customer = '0' AND g.id_guest not in (SELECT id_guest from ps_cart) Nettoyage ps_log DELETE c FROM ps_log c WHERE c.date_add < '$date_moins_6_mois' Ai-je oublié quelque chose ? Merci d'avance Link to comment Share on other sites More sharing options...
Mediacom87 Posted July 7, 2023 Share Posted July 7, 2023 Bonjour, Si vous souhaitez être tranquille et intégrer d'autres scénarios que vous pourrez lancer régulièrement à l'aide d'une tâche Cron, vous avez ce module https://www.prestatoolbox.fr/outils-administration/457-automatisez-le-nettoyage-de-votre-boutique-prestashop.html 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