The problem of triggering PHP in mysql is now needed. a fixed data entry in mysql database triggers a PHP program as soon as it changes. how can this problem be achieved? Thank you ~, The changes in the transition table can only be checked by writing related information to a transitional table in the mysql trigger. the changes can only be php round-robin, but the transition table is small and should not affect the PHP trigger problem in mysql.
The requirement is as follows,
A fixed data entry in the mysql database triggers a PHP program as long as it changes. how can this problem be achieved? Thank you ~
------ Solution --------------------
Only related information can be written to a transitional table in the mysql trigger.
Check that the change in the transition table can only be php round-robin, but the transition table is small and should not be affected.
------ Solution --------------------
Can I use the stored procedure written in C?
The idea is as follows:
1. trigger a stored procedure using the trigger mechanism;
2. the stored procedure calls a C-written stored procedure;
3. the stored procedure written in C calls the PHP script in CGI mode.
I have never tried it. it should be okay.
------ Solution --------------------
If the round robin is less than one second, will the server explode?
I think it will be painful to consider the stress issue in the future, even if you have handled it before.
------ Solution --------------------
This requirement is an incremental model. it is not suitable to use a database as the storage medium.
If the message is incrementing, you can directly append it to a file. you need to save the message number in a file and lock the message number file before the message file. the Message number is + 1, then, append the message to the message file and release the lock.
The client AJAX maintains the maximum message number for the last request.
Round robin is positive, HTTP is not really pushed, and AJAX is a persistent connection to the cloud.
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