PHP mysqli_thread_id() Function
Return the current connection's thread ID, then kill the connection:
Definition and Usage
The mysqli_thread_id() function returns the current connection's thread ID, then uses the mysqli_kill() function to kill the connection.
**Note:** If the connection is broken and reconnected, the thread ID will change. Therefore, only obtain the thread ID when you need it.
Syntax
mysqli_thread_id(
connection
)
;
| Parameters | Description |
|---|---|
| connection | Required. Specifies the MySQL connection to use. |
Technical Details
| Return Value: | Returns the current connection's thread ID. |
|---|---|
| PHP Version: | 5+ |
PHP MySQLi Reference Manual