MySQL triggers PHP related issues

Source: Internet
Author: User
MySQL triggers php problems
Now there's the need for that,
MySQL database of a set of data as long as a change, it triggers a PHP program, how to achieve AH? Thank you ~

------Solution--------------------
You can only write information about a transition table in a MySQL trigger
Check the transition table changes can only be PHP polling, but the transition table is very small, it should not affect much
------Solution--------------------
Can i use stored procedures written in C?
Ideas are as follows:
1, trigger the trigger mechanism, triggering a stored procedure;
2, the stored procedure calls a C-write stored procedure;
3. C writes the stored procedure and then calls the PHP script in CGI mode.
I haven't tried it, it should be OK.
------Solution--------------------
Less than 1 seconds of round robin, will the server explode?
I think this should not consider the late pressure problems, even if you have to deal with the past, and later also very painful.
------Solution--------------------
This requirement is an incremental model, and using a database as a storage medium is inherently inappropriate and overqualified.

If the message is incremented, append the write file directly, need a file to save the message number, operation message file before the lock message number file, message number +1, and then append the message to the message file, and finally put out the lock.

Client Ajax maintains its own maximum message number for the last request.

Polling is sure, HTTP does not really push, Ajax long connect cloud.
  • 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.