From 56d5351b59578788c81e3c17b85f0586555d717e Mon Sep 17 00:00:00 2001 From: Jeremy Laine Date: Thu, 19 Apr 2007 14:25:21 +0000 Subject: [PATCH] clarify use of mysql_fetch_array : we really want mysql_fetch_assoc --- include/diogenes/diogenes.table-editor.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/diogenes/diogenes.table-editor.inc.php b/include/diogenes/diogenes.table-editor.inc.php index 22ec589..75ebe32 100644 --- a/include/diogenes/diogenes.table-editor.inc.php +++ b/include/diogenes/diogenes.table-editor.inc.php @@ -255,7 +255,7 @@ class DiogenesTableEditor extends DiogenesDatabaseTable { $sql = $this->make_select(false,$id); $res = $this->dbh->query($sql); - if ($myrow = mysql_fetch_array($res)) { + if ($myrow = mysql_fetch_assoc($res)) { $this->id = $id; foreach ($this->vars as $key => $val) { $this->vars[$key]['value'] = $myrow[$key]; @@ -491,7 +491,7 @@ class DiogenesTableEditor extends DiogenesDatabaseTable { $p_stop = $this->maxrows ? min($p_total, $p_start + $this->maxrows) : $p_total; $counter = 0; - while (($counter < $p_stop) and ($myarr = mysql_fetch_array($res))) { + while (($counter < $p_stop) and ($myarr = mysql_fetch_assoc($res))) { if ($counter >= $p_start) { $actions = array(); foreach ($this->actions as $myaction) { -- 2.1.4