Return the thread ID for the current connection, then kill the connection:
The mysqli_thread_id() function returns the thread ID for the current connection. The connection can then be killed with the mysqli_kill() function.
Note: If the connection is broken and you reconnect, the thread ID will be changed. Therefore; get the thread ID only when you need it.
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | Returns the thread ID for the current connection |
---|---|
PHP Version: | 5+ |