Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarvin Hicking <me@supergarv.de>2004-01-28 14:23:38 +0300
committerGarvin Hicking <me@supergarv.de>2004-01-28 14:23:38 +0300
commitb8df10e41e10dba9bc6b3754a654a339676e9abd (patch)
tree28cb1b8cb4e2e25c9b9aa7aff46f664656036ce5 /browse_foreigners.php
parent2f4da6996533fd087687ab27e5e43a211dfd4618 (diff)
Get rid of mysql_data_seek(). Use pre-cached PHP array for mysqli
compatibility and bandwidth saving. Memory issues by caching should not arise, as the used cache will (in our previously used cases) only cache index fields and max. 200 relation rows. I tested performance on my machine: By fetching 400kb of data twice via mysql_fetch_row() -> mysql_data_seek() -> mysql_fetch_row() this was performed in 0.25 seconds. By fetching it once and caching in a PHP array via mysql_fetch_row -> foreach this is performed in 0.32 seconds. With usual data as used in PMA (10kb) I could only detect a performance change of 0.009 seconds, which is respectable I think. By not using mysql_data_seek we are later able to use global mysqli USE_RESULT options to fetch rows singly. I discussed that yesterday with Rabus, and if there are any objections we can surely discuss that further on the list.
Diffstat (limited to 'browse_foreigners.php')
-rw-r--r--browse_foreigners.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/browse_foreigners.php b/browse_foreigners.php
index e7e1c0fd7c..7d032a37bd 100644
--- a/browse_foreigners.php
+++ b/browse_foreigners.php
@@ -138,7 +138,7 @@ $header = ' <tr>
echo $header;
-if (isset($disp) && $disp) {
+if (isset($disp_row) && is_array($disp_row)) {
function dimsort($arrayA, $arrayB) {
$keyA = key($arrayA);
$keyB = key($arrayB);
@@ -153,7 +153,7 @@ if (isset($disp) && $disp) {
$mysql_key_relrow = array();
$mysql_val_relrow = array();
$count = 0;
- while ($relrow = @PMA_DBI_fetch_assoc($disp)) {
+ foreach($disp_row AS $disp_row_key => $relrow) {
if ($foreign_display != FALSE) {
$val = $relrow[$foreign_display];
} else {