clarify use of mysql_fetch_array : use mysql_fetch_assoc or mysql_fetch_row
authorJeremy Laine <jeremy.laine@m4x.org>
Thu, 19 Apr 2007 14:28:44 +0000 (14:28 +0000)
committerJeremy Laine <jeremy.laine@m4x.org>
Thu, 19 Apr 2007 14:28:44 +0000 (14:28 +0000)
include/Barrel/Events.php
include/Barrel/Menu.php

index 5a20fed..5278c47 100644 (file)
@@ -75,7 +75,7 @@ class Diogenes_Barrel_Events
                   ."left join {$globals->table_log_sessions} as s on e.session=s.id "
                   ."where e.data like '{$this->barrel->alias}:%' "
                   ."order by stamp desc limit 0,10");
-    while ($myarr = mysql_fetch_array($res)) {
+    while ($myarr = mysql_fetch_assoc($res)) {
       $myarr['author'] = call_user_func(array($globals->session,'getUsername'),$myarr['auth'],$myarr['uid']);
       $myarr['flags'] = EVENT_FLAG_NONE;
       list($op_alias, $op_file) = split(":",$myarr['data']);
index e5279c9..7703288 100644 (file)
@@ -58,7 +58,7 @@ class Diogenes_Barrel_Menu
     /* renumber the other menu entries so that they are between 1 and the number of entries */
     $res = $this->dbh->query("SELECT MID FROM {$this->table_menu} WHERE MIDpere=$parent ORDER BY ordre");
     $i = 0;
-    while (list($MIDtoorder) = mysql_fetch_array($res)) {
+    while (list($MIDtoorder) = mysql_fetch_row($res)) {
       $i++;
       $this->dbh->query("UPDATE {$this->table_menu} SET ordre=$i WHERE MID=$MIDtoorder");
     }