How to automatically upload new data to the database as soon as it is available
程序小学生
程序小学生 2022-12-21 14:13:43
0
2
1167

Requirement: Implement automatic uploading of data as soon as the database has data

Explanation of requirement: I have done a hospital electronic hair bleaching project before. The requirement is like this. After the outpatient fee office checks out, the database will appear. The patient's payment information is then uploaded to the provincial tax platform to generate an electronic payment. What we did before was that when there was a new payment, it was displayed on the page. The charging personnel clicked to upload, and the data was uploaded. Now they think it is too busy and it is troublesome to go to the click to upload. I asked if it can be done as soon as possible. If there is new payment data, the program will automatically detect it and upload it automatically. But to retain the function of manual click upload, you can choose to upload automatically, or you can choose not to upload automatically and manually click and generate it yourself.

I don’t have a clue, so I beg God to give me some ideas and see how to do it properly

程序小学生
程序小学生

reply all(2)
php爱好者

Brother, according to the process you did before, you should echo the results to the interface, and then upload the data based on click operations.

Can this be done like this? You judge whether the result is echoed successfully. If successful, the event corresponding to your previous click operation is automatically called and uploaded automatically.

The echo is not successful. , just follow the usual method and play a reminder

加特米

Make the data upload into a function, put it in the outpatient charging station after checkout, and execute this function here. The rest of the place does not need to be touched.

If you want to upload automatically or not,

There are two options here.

One.

That is to make a master button to judge. Click the master button to make it automatic, and click it again to make it not automatic.

二.

The second option is to delay the execution of this function after checking out at the outpatient fee office. You can also set the delay time in the background to execute this function. Of course, this is the place to judge the delay. When the time is up, determine whether the data has been uploaded. If it has been uploaded, it will not be executed.

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!