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
Last updated: Fri, 06 Nov 2009

view this page in

mysql_thread_id

(PHP 4 >= 4.3.0, PHP 5)

mysql_thread_idReturn the current thread ID

Descrierea

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.

Parametri

link_identifier

Conexiunea MySQL. Dacă identificatorul legăturii nu este specificat, se presupune că este ultima legătură deschisă cu ajutorul mysql_connect(). Dacă nu este găsită nici o astfel de legătură, se va încerca crearea uneia prin apelul mysql_connect() fără argumente. În caz că nici o conexiune nu este găsită sau stabilită, se va genera o eroare de nivelul E_WARNING.

Valorile întroarse

The thread ID on success, or FALSE on failure.

Exemple

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);
}
?>

Exemplul de mai sus va afişa ceva similar cu:

current thread id is 73

Vedeţi de asemenea



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

mysql_unbuffered_query> <mysql_tablename
Last updated: Fri, 06 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites