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, 13 Nov 2009

view this page in

mysql_thread_id

(PHP 4 >= 4.3.0, PHP 5)

mysql_thread_idReturna o ID da thread atual

Descrição

int mysql_thread_id ([ resource $link_identifier ] )

mysql_thread_id() retorna o ID da thread atual. Se a conexão for perdida e você reconectar com mysql_ping(), o ID da thread irá muda. Isto indica que você não deve guardar o pegar ID e guarda-lo para depois. Você deve pega-lo quando você precisar dele.

Exemplo #1 Exemplo mysql_thread_id()

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

O exemplo acima deve produzir a seguinte saída:

current thread id is 73

Veja também mysql_ping() e mysql_list_processes().



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, 13 Nov 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites