php - Sending an email depending on % records that have a certain value -


Is it possible to send email to MySQL or PHP when% of people listed in the MySQL database, for example, I have 500 people listed in a MySQL DB, they are invited to participate in a brief survey, each time someone has completed their record, then updated to complete it is. What I see is a way of MySQL or some PHP scripts, to send me an email, when 10% responded to the survey.

Create a trigger and connect to the table with the results if the user completes the full record, a mail queue table ( Add a record (using this trigger) in an example) with status "not processed".

Create a chrono that checks the mail queue table for the "not processed" record and execute the calculation, then send an email you can only send email from PHP and not directly to MySQL.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -