Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP mysqli_thread_id() Function

PHP mysqli_thread_id() Function

PHP MySQLi Reference Manual PHP MySQLi Reference Manual

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 PHP MySQLi Reference Manual