What is mysql list processes in PHP
In this article I am going to explain about mysql_list_processes function in PHP.
PHP mysql_list_processes() Function
The PHP mysql_list_processes function used to returns the list mysql processes.
Syntax of mysql_list_processes function
mysql_list_processes(connection) |
Parameters in mysql_list_processes function
It has only one parameter:
Parameter |
Description |
connection |
It specifies MySQL connection. |
Example of mysql_list_processes function
<?php
$con=mysql_connect("localhost","gupta","sharad");
if(!$con)
{
die("Could not connect: " .mysql_error());
}
$processes=mysql_list_processes($con);
while($row=mysql_fetch_assoc($processes))
{
printf("%s %s %s %s %s\n","Id is: ". $row["Id"]."<br/>","Host is:". $row["Host"]."<br/>","Db=".$row["db"]."<br/>","Command=".$row["Command"]."</br>","Time is:". $row["Time"]);
}
mysql_close($con);
?>
|
Output:

You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here