donglei1973 2014-10-28 12:23
浏览 29
已采纳

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

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.

  • 写回答

1条回答 默认 最新

  • doufeiqiong3515 2014-10-28 12:29
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 正弦信号发生器串并联电路电阻无法保持同步怎么办
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)