Can mysql triggers call php functions?

Source: Internet
Author: User
Can mysql triggers call php functions? can mysql triggers or stored procedures call php functions.
Write
I have a function. after a user sends a message insert in aap, I want to send an email reply using the trigger.
Because our website data sources include app and webpage reply emails on webpage


Reply to discussion (solution)

Mysql? Php method ?? No,
Depends on your needs ,???? In php, in php? Usage ratio? Okay.

MySQL is not allowed.
Sqlite can

This is the most stupid method to add a scheduled plan to scan table data and then send emails.

This can be implemented using PHP. isn't it possible for you to directly insert a database without bypassing PHP? it is not implemented in PHP code yet, so PHP can determine whether the insert is successful and then send an email.

Using mysql to call the php script is not very realistic. sending emails can also be implemented in your code. why do you want to implement it in the database.


I think I can write a php page with a long timeout, and then access this page with the built-in mysql trigger.

Because the data is inserted in the APP, the jsp development mail is used to send the data in php.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.