Hi
Im creating a class where I log to a file mysql operations like connect, query and close.
This is to track down errors and misplaced data.
There not much info on mysql_thread_id($dblink), but it looks like this returns the process thread id upon opening a mysql connection until its lost or closed.
So how many ever queries I execute after opening a connection, this therad-id (of $dblink) will remain the same till the end of the script right - (or till the connection ends) ?
Thanks
mysql_thread_id
Moderator: General Moderators
http://us2.php.net/mysql_thread_id
"Retrieves the current thread ID. If the connection is lost, and a reconnect with mysql_ping() is executed, the thread ID will change. This means only retrieve the thread ID when needed."
As long as the connection remains open through a single connection request, it will stay the same. If the connection ever drops and you reconnect, it changes.
"Retrieves the current thread ID. If the connection is lost, and a reconnect with mysql_ping() is executed, the thread ID will change. This means only retrieve the thread ID when needed."
As long as the connection remains open through a single connection request, it will stay the same. If the connection ever drops and you reconnect, it changes.