Jump to content

[SOLVED] How to implement a pause during DB installation


Chaos Dragon

Recommended Posts

Ok I am working on a guestbook script and I have an install.php script I am working on for the DB tables and all inserts. Now what I am looking to do is add a pause after a certain time for an x amount of time then it will resume and again pause for x amount of time then resume, as not to overload the DB during installation. Now not only do I want it to pause, but I would like a counter or something to show when it gets to the pause. Such as Installation will resume in: x sec. And when it shows it will also count down.

EX. Installation will resume in: 5 sec 4,3,2,1,0 then it resumes then when it pauses again it will display Installation will resume in: 5 sec. 4,3,2,1,0.

Hope that made sense.

If any one knows how I can implement this or can point me in the right direction to figure this out.

Any help will be appreciated.

Maybe this is clearer.

Ok, then I was misinformed of that, but as for the pause thing for knowledge purposes, how would I do that. Implement a pause with a count down that shows in browser starting from a predefined time then executes when it reaches 0.

The only way you could pause the script would be to use sleep, as for your countdown, that would need to be done using Javascript.

 

You might be better to break your script down into smaller scripts then use Ajax to call them one after the other.

The only way you could pause the script would be to use sleep, as for your countdown, that would need to be done using Javascript.

 

You might be better to break your script down into smaller scripts then use Ajax to call them one after the other.

 

I kinda thought so......Thank you for the info. I am still pretty new to PHP and MySQL...So I am still learning on what i can do with PHP...HTML, CSS, and Javascript were the first languages I learned.....Still learning Javascript also but i have a good Idea on that. And have made a small rating script using Javascript and Ajax. I'll probably just leave the install script pretty much as is and go with that. No errors during install and works beautifully as intended.

Again Thank You.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.