PHP mysql_thread_id() Function Example

PHP mysql_thread_id() Function Example


Posted in : PHP Posted on : February 21, 2011 at 6:16 PM Comments : [ 0 ]

The mysql_thread_id() function is used to find the current thread ID.

PHP mysql_thread_id() Function Example:

The mysql_thread_id() function is used to find the current thread ID. The mysql_thread_id() function returns current thread ID on success or false for failure.

Syntax:

mysql_thread_id(connection)

Where connection is the current mysql database connection.

Example:

<?php
$connection = mysql_connect("localhost", "root", "root");
if (!$connection) {
die('PHP Mysql database connection could not connect : ' . mysql_error());
}
echo "Thread id is " . mysql_thread_id();
mysql_close($connection);
?> 

Output:

Thread id is 349

Download Example Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics