Examples for business, study, careers, love, and more...
Examples :: MYSQL Examples :: Example of Kill Mysql statement

Example of Kill Mysql Statement:

$result = mysql_query("SHOW FULL PROCESSLIST");
WHILE ($row=mysql_fetch_array($result)) {
$process_id=$row["Id"];
If ($row["Time"] > 200 ) {
$sql="KILL $process_id";
mysql_query($sql);

Example of Mysql Kill


KILL [CONNECTION | QUERY] thread_id