From adaa1cbf781213f581447f3c8bb24e9193cd53d0 Mon Sep 17 00:00:00 2001 From: Steven Mondji-Lerider Date: Mon, 17 Mar 2014 15:44:47 +0000 Subject: [PATCH] Fixing SQL query --- src/update_mails.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/update_mails.sh b/src/update_mails.sh index 664b26b8..80385cff 100755 --- a/src/update_mails.sh +++ b/src/update_mails.sh @@ -67,7 +67,7 @@ done # List the adresses to DELETE # Delete if only if there isn't any mailbox refering to it -mysql_query "DELETE FROM address LEFT JOIN mailbox ON address.id = mailbox.address_id WHERE mailbox.id IS NULL AND (address.mail_action = 'DELETE' OR address.mail_action = 'DELETING');" +mysql_query "delete a FROM address a LEFT JOIN mailbox m ON a.id = m.address_id WHERE m.id IS NULL AND (a.mail_action = 'DELETE' OR a.mail_action = 'DELETING');" # Delete the lock rm -f "$LOCK_FILE"