参数 | 描述 |
---|---|
connection | 可选。规定 MySQL 连接。如果未规定,则使用上一个连接。 |
<?php $con = mysql_connect("localhost", "hello", "321"); if (!$con) { die(Could not connect: . mysql_error()); } $my_list = mysql_list_processes($con); while ($row = mysql_fetch_assoc($my_list)) { print_r($row); } mysql_close($con); ?>
输出类似:
Array ( [Id] => 2 [User] => hello [Host] => localhost:1038 [db] => [Command] => Processlist [Time] => 0 [State] => [Info] => )
制作:
http://www.7di.net 生活网搜集整理 参考: http://www.w3school.com.cn/php/func_mysql_list_processes.asp |