根据具有特定值的%记录发送电子邮件

Is it possible to have either MySQL or PHP send an email when a % of people listed in a MySQL database have responded to a question.

For example, I have 500 people listed in a MySQL DB, they are invited to take part in a short survey, each time a person completed their record is updated to reflect they have completed. What I'm looking for is a way of MySQL or some PHP script to send me an email when, say 10% have responded to the survey.

Create a trigger and connect to a table with results. If user complete record, add a record (using this trigger) to a mail queue table (an example with status "not processed").

Create a cronjob that checks mail queue table for "not processed" records and execute calculation, then send email. You can send email from PHP only and not from Mysql directly.