Best Method for MySQL wait
Posted: Thu Feb 25, 2016 4:25 am
Hello, I have some code in my livecode app which submits data to php for inserting data in the MySQL. The PHP returns "success" when complete and then the script progresses.
The problem I am having is when a large amount of data is being submitted, the livecode script displays my error message as it is too fast, but in reality it is actually being processed/submitted.
1. Is there a method to make livecode wait for the PHP "success" message without making other users wait unnecessarily when they are just submitting small amount of data (like inserting 1 record)?
2. I believe there is a method to also not let the user not make action while the PHP is working.
3. Lastly, It would be great to have a waiting indicator like I have seen on other programs if they are forced to wait a few seconds.
Thank you for any assistance.
The problem I am having is when a large amount of data is being submitted, the livecode script displays my error message as it is too fast, but in reality it is actually being processed/submitted.
1. Is there a method to make livecode wait for the PHP "success" message without making other users wait unnecessarily when they are just submitting small amount of data (like inserting 1 record)?
2. I believe there is a method to also not let the user not make action while the PHP is working.
3. Lastly, It would be great to have a waiting indicator like I have seen on other programs if they are forced to wait a few seconds.
Code: Select all
on submit
put "VAR="& tvar into tSendData
liburlsetsslverification false
post tSendData to URL <address>&"phpScript.php"
if it is "success" then
...
else
answer warning "<p align=center> <font face=Marker Felt Wide color=blue size=22> Problem with submission. </font></p>"
exit submit
end submit