clarify use of mysql_fetch_array : we really want mysql_fetch_assoc
authorJeremy Laine <jeremy.laine@m4x.org>
Thu, 19 Apr 2007 14:25:21 +0000 (14:25 +0000)
committerJeremy Laine <jeremy.laine@m4x.org>
Thu, 19 Apr 2007 14:25:21 +0000 (14:25 +0000)
include/diogenes/diogenes.table-editor.inc.php

index 22ec589..75ebe32 100644 (file)
@@ -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) {