I have a (PHP) script which runs on a new row in MySQL. However, it will continually send the emails, even if they’ve already been sent…causing mass emails into the users Inbox.
The script is quite big, so I cant paste it here – http://pastebin.com/6v75F4Gv
Is there anyway I can somehow check if this script has already sent ‘xx’ email, but if a new row containing ‘zz’ and the user has specified they wish to receive content containing ‘zz’ it sends the ‘zz’ row?
ie. It stops duplicate/etc. emails.
Note: MySQL table is in the following format:
Table: feed
Rows in pager: id, title, description, date
Table: recipients
Rows in recipients: id, email, suburb
Thanks 🙂
Neither of your tables has a column to log if the email has been sent, which is what I’d expect to see happen here:
…which would mean updating:
…to be sure that your query isn’t picking up those that have been successfully sent.