What is mysql thread id in PHP
In this article I am going to explain about mysql_thread_id function in PHP.
PHP mysql_thread_id() Function
The PHP mysql_thread_id function is used to returns current thread id. It returns thread id on success or false on failure.
Syntax of mysql_thread_id function
mysql_thread_id(connection) |
Parameters in mysql_thread_id function
It has only one parameter:
Parameter |
Description |
connection |
It specifies MySQL connection. |
Example of mysql_thread_id function
<?php
$con=mysql_connect("localhost","gupta","sharad");
if(!$con)
{
die("Could not connect:".mysql_error());
}
echo "The thread id is: ".mysql_thread_id();
mysql_close($con);
?>
|
Output:

You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here