Fixing SQL query
This commit is contained in:
parent
84adcb658b
commit
adaa1cbf78
|
@ -67,7 +67,7 @@ done
|
||||||
|
|
||||||
# List the adresses to DELETE
|
# List the adresses to DELETE
|
||||||
# Delete if only if there isn't any mailbox refering to it
|
# 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
|
# Delete the lock
|
||||||
rm -f "$LOCK_FILE"
|
rm -f "$LOCK_FILE"
|
||||||
|
|
Loading…
Reference in New Issue