downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

mysql_unbuffered_query> <mysql_tablename
[edit] Last updated: Fri, 18 Sep 2009

view this page in

mysql_thread_id

(PHP 4 >= 4.3.0, PHP 5)

mysql_thread_idReturn the current thread ID

Описание

int mysql_thread_id ([ resource $link_identifier ] )

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.

Параметри

link_identifier

Връзката към MySQL. Ако не е указана, се използва последната създадена връзка от mysql_connect(). Ако не намери такава връзка, ще направи опит да установи връзка, все едно е изпълнена mysql_connect() без параметри. Ако случайно не е намерена или създадена никаква връзка, ще се генерира предупреждение от ниво E_WARNING.

Връщани стойности

The thread ID on success, or FALSE on failure.

Примери

Example #1 mysql_thread_id() example

<?php
$link 
mysql_connect('localhost''mysql_user''mysql_password');
$thread_id mysql_thread_id($link);
if (
$thread_id){
    
printf("current thread id is %d\n"$thread_id);
}
?>

Примерът по-горе ще изведе нещо подобно на:

current thread id is 73

Вж. също



add a note add a note User Contributed Notes mysql_thread_id
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites