Jump to content

How to stop SQL execution in PHP


abdfahim

Recommended Posts

When I insert huge amount of data to my mysql table using php, sometime I want to stop inserting in some middle point. But if I even close the window, mysql continue inserting in background. Is there any way that I forcefully stop the execution of mysql_query() command at some mid-point of the execution?

Link to comment
Share on other sites

Well, my case is not that easy. Everyday I have to calculate many data and insert it into database. Now I dont know why, but some day it takes like 10 minuites, but some time even after 5/6 hours, the process is still running (I know that because I see mysqld-nt process running and taking cpu/ram in task manager). In that case, I want to stop execution if it takes so long.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.