Fixing SQL query

This commit is contained in:
Steven Mondji-Lerider 2014-03-17 15:44:47 +00:00
parent 84adcb658b
commit adaa1cbf78
1 changed files with 1 additions and 1 deletions

View File

@ -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"