Name

mysql_thread_id( )

Synopsis

mysql_thread_id([connection])

This returns the thread identification number for the current MySQL connection. An identifier for another connection may be given. This function is available starting with Version 4.3 of PHP.

...
$connection = mysql_connect('127.0.0.1', 'russell', 'spenser');
$info = mysql_thread_id($connection);
print "Thread ID:  $info \n";
...

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.