From: Jeremy Laine Date: Thu, 19 Apr 2007 14:28:44 +0000 (+0000) Subject: clarify use of mysql_fetch_array : use mysql_fetch_assoc or mysql_fetch_row X-Git-Url: http://git.polytechnique.org/?p=diogenes.git;a=commitdiff_plain;h=a8daf9136f2d4ba13a54d5122e2c3a9e65dc8c34 clarify use of mysql_fetch_array : use mysql_fetch_assoc or mysql_fetch_row --- diff --git a/include/Barrel/Events.php b/include/Barrel/Events.php index 5a20fed..5278c47 100644 --- a/include/Barrel/Events.php +++ b/include/Barrel/Events.php @@ -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']); diff --git a/include/Barrel/Menu.php b/include/Barrel/Menu.php index e5279c9..7703288 100644 --- a/include/Barrel/Menu.php +++ b/include/Barrel/Menu.php @@ -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"); }