mysqli_kill mysqli->kill Asks the server to kill a MySQL thread Description Procedural style: boolmysqli_kill objectlink intprocessid Object oriented style (method) mysqli bool kill intprocessid This function is used to ask the server to kill a MySQL thread specified by the processid parameter. This value must be retrieved by calling the mysqli_thread_id function. To stop a running query you should use the SQL command KILL QUERY processid. &reftitle.returnvalues; &return.success; &reftitle.seealso; mysqli_thread_id Example Object oriented style thread_id; /* Kill connection */ $mysqli->kill($thread_id); /* This should produce an error */ if (!$mysqli->query("CREATE TABLE myCity LIKE City")) { printf("Error: %s\n", $mysqli->error); exit; } /* close connection */ $mysqli->close(); ?> ]]> Procedural style ]]> The above examples would produce the following output: