Copy link to clipboard
Copied
Hi,
I want to create a page that takes data from a form and insert it into a table and once its there, after maybe 1-5 minutes have certain fields copied to another table.
How can I achive this?
I will be using PHP & MySQL
Copy link to clipboard
Copied
Seems like a short delay where nothing much could happen. For that short of an execution time I would say use the sleep command ( http://php.net/manual/en/function.sleep.php ). If it is a longer time setup a cron job.
Copy link to clipboard
Copied
SnakEyez02 wrote:
Seems like a short delay where nothing much could happen. For that short of an execution time I would say use the sleep command ( http://php.net/manual/en/function.sleep.php ).
I would be very wary about using sleep() for more than a couple of seconds. I'm not sure what would happen if the same script were called again before the sleep time had expired.
Copy link to clipboard
Copied
Can you give us some background as to why you want to do this?
Copy link to clipboard
Copied
Sure.
I want to capture all the data on the form, but not have everything in one table.
So one table is the raw data and the other is just what I need to work with, I just wanted to know if I can delay the data going into the second table
Copy link to clipboard
Copied
The_FedEx_Guy wrote:
I want to capture all the data on the form, but not have everything in one table.
So one table is the raw data and the other is just what I need to work with, I just wanted to know if I can delay the data going into the second table
But why delay the data going into the second table? Just run two consecutive insert queries, one for the main table, the second for the table you want to work with.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now