No need to grab all results to memory.

This commit is contained in:
Michal Čihař
2006-05-30 09:26:52 +00:00
parent 942357ec92
commit 51bc0252fa
3 changed files with 9 additions and 7 deletions

View File

@@ -38,10 +38,10 @@ echo '<h2>' . "\n"
/**
* Sends the query and buffers the result
* Sends the query
*/
$sql_query = 'SHOW' . ( empty( $full ) ? '' : ' FULL' ) . ' PROCESSLIST';
$serverProcesses = PMA_DBI_fetch_result( $sql_query );
$result = PMA_DBI_query($sql_query);
PMA_showMessage( $GLOBALS['strSuccess'] );
@@ -70,7 +70,7 @@ PMA_showMessage( $GLOBALS['strSuccess'] );
<tbody>
<?php
$odd_row = true;
foreach ( $serverProcesses AS $process ) {
while($process = PMA_DBI_fetch_assoc($result)) {
?>
<tr class="<?php echo $odd_row ? 'odd' : 'even'; ?>">
<td><a href="./server_processlist.php?<?php echo $url_query . '&amp;kill=' . $process['Id']; ?>"><?php echo $strKill; ?></a></td>
@@ -95,4 +95,4 @@ foreach ( $serverProcesses AS $process ) {
* Sends the footer
*/
require_once('./libraries/footer.inc.php');
?>
?>