Can a MySQL trigger call a PHP function?

Source: Internet
Author: User
A MySQL trigger or a stored procedure can call a PHP function.
If there should be write
I have a feature user after the AAP send message insert I want to send a message with a trigger reply
Because our web site data sources have app-side and web-side reply mail is on the web side


Reply to discussion (solution)

MySQL? Using PHP method?? No
Look what you need,???? Do it in PHP, in PHP?

MySQL can not
SQLite can

It's the stupidest way to slowly scan the table data and then send the email with a timed schedule.

This can be implemented with PHP, is it possible that your database insert operation will bypass PHP directly inserted, not in PHP code implementation, then PHP to determine the success of the insert after the email.

Using MySQL to invoke PHP script should not be very realistic, send mail can also be implemented in your code, why want to implement in the database.


I think I can write a PHP page with a long timeout, and then MySQL built-in triggers to access this page

Because the data is inserted in the app is using JSP development mail is sent 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.