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

search for in the

mysql_unbuffered_query> <mysql_tablename
Last updated: Fri, 27 Jun 2008

view this page in

mysql_thread_id

(PHP 4 >= 4.3.0, PHP 5, PECL mysql:1.0)

mysql_thread_id — Zwraca id bieżącego wątku

Opis

int mysql_thread_id ([ resource $identyfikator_połączenia ] )

mysql_thread_id() zwraca id bieżącego wątku. Jeśli połączenie zostało przerwane i nawiązane ponownie przy użyciu funkcji mysql_ping(), to id wątku się zmieni. Oznacza to, że nie powinno się pobierać id wątku i zapisywać do późniejszego użycia, lecz pobierać zawsze, gdy jest potrzebny.

Example #1 przykład użycia mysql_list_processes()

<?php
$link 
mysql_connect('localhost''uzytkownik''haslo');
$thread_id mysql_thread_id($link);
if (
$thread_id){
    
printf ("id bieżącego wątku: %d\n"$thread_id);
}
?>

Powyższy przykład da następujący wynik:

id bieżącego wątku: 73

Patrz także: mysql_ping(), 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, 27 Jun 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites