Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: mysql_thread_id - Manual
[go: Go Back, main page]

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" width="11" height="7"/> <mysql_tablename
Last updated: Sun, 25 Nov 2007

view this page in

mysql_thread_id

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

mysql_thread_id — カレントのスレッド ID を返す

説明

int mysql_thread_id ([ resource $link_identifier ] )

カレントのスレッド ID を取得します。接続が一度切断され、 mysql_ping() によって再接続された場合には、 スレッド ID は変わります。つまり、スレッド ID は必要になったその時点で 取得すべきだということです。

パラメータ

link_identifier

MySQL 接続。 指定されない場合、mysql_connect() により直近にオープンされたリンクが 指定されたと仮定されます。そのようなリンクがない場合、引数を指定せずに mysql_connect() がコールした時と同様にリンクを確立します。 リンクが見付からない、または、確立できない場合、 E_WARNING レベルの警告が生成されます。

返り値

成功した場合にスレッド ID 、失敗した場合に FALSE を返します。

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

上の例の出力は、たとえば 以下のようになります。

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 | sitemap | contact | advertising | mirror sites