Forum und email

mysql_list_processes

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

mysql_list_processes — Lista los procesos MySQL

Descripción

resource mysql_list_processes ([ resource $id_enlace ] )

Recupera los hilos del servidor MySQL actuales.

Lista de parámetros

link_identifier

The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect() is assumed. If no such link is found, it will try to create one as if mysql_connect() was called with no arguments. If by chance no connection is found or established, an E_WARNING level warning is generated.

Valores retornados

Un apuntador tipo resource de resultado en caso de tener éxito, o FALSE si ocurre un error.

Ejemplos

Example#1 Ejemplo de mysql_list_processes()

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

$resultado mysql_list_processes($enlace);

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

El resultado del ejemplo seria algo similar a:

1 localhost test Processlist 0
4 localhost mysql sleep 5