mysql 触发器可以 调用php 函数吗解决方法

WBOY
Release: 2016-06-13 12:17:40
Original
1338 people have browsed it

mysql 触发器可以 调用php 函数吗
mysql 触发器或者是存储过程可以 调用php 函数吗。
如果有应该写
我有一个功能      用户在aap 发送留言 insert 后         我想用触发器   发一封邮件回复   
因为我们的网站数据来源有app 端和网页端    回复邮件是在网页端
------解决思路----------------------
mysql 調用php方法應該不能,
看你需求,這個應該在php中做,在php中調用比較好。
------解决思路----------------------
MySQL 不可以
sqlite 可以
------解决思路----------------------
加个定时计划 慢慢扫描表数据然后发送邮件,这是最笨的方法。
------解决思路----------------------
这个用PHP来实现即可,难道你数据库插入操作能绕开PHP直接插入不成,还不是在PHP里代码实现,那么PHP判断插入成功后发邮件即可。
------解决思路----------------------
用mysql调用php脚本应该不是很现实吧, 发送邮件也可以在你的代码里实现呢,为什么想在数据库里实现。
------解决思路----------------------

我觉得可以写个超长超时的php页,然后mysql内置的触发器去访问这个页面

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!