PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<mysql_list_fieldsmysql_list_tables>
view the version of this page
Last updated: Mon, 14 Feb 2005

mysql_list_processes

(PHP 4 >= 4.3.0, PHP 5)

mysql_list_processes -- List MySQL processes

Description

resource mysql_list_processes ( [resource link_identifier] )

mysql_list_processes() returns a result pointer describing the current server threads.

Example 1. mysql_list_processes() example

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

The above example would produce the following output:

1 localhost test Processlist 0
4 localhost mysql sleep 5

See also mysql_thread_id() and mysql_stat().



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

<mysql_list_fieldsmysql_list_tables>
 Last updated: Mon, 14 Feb 2005
show source | credits | sitemap | contact | advertising | mirror sites 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://php.planetmirror.com/
Last updated: Fri Mar 11 09:15:35 2005 EST