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

search for in the

mysql_list_tables> <mysql_list_fields
[edit] Last updated: Fri, 25 May 2012

view this page in

mysql_list_processes

(PHP 4 >= 4.3.0, PHP 5)

mysql_list_processesMySQL プロセスのリストを得る

説明

resource mysql_list_processes ([ resource $link_identifier = NULL ] )

現在の MySQL サーバーのスレッドを取得します。

パラメータ

link_identifier

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

返り値

成功した場合に結果ポインタ resource 、 失敗した場合に FALSE を返します。

例1 mysql_list_processes() の例

<?php
$link 
mysql_connect('localhost''mysql_user''mysql_password');

$result mysql_list_processes($link);
while (
$row mysql_fetch_assoc($result)){
    
printf("%s %s %s %s %s\n"$row["Id"], $row["Host"], $row["db"],
        
$row["Command"], $row["Time"]);
}
mysql_free_result($result);
?>

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

1 localhost test Processlist 0
4 localhost mysql sleep 5

参考



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

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