Ignore:
Timestamp:
Nov 15, 2009, 1:26:09 PM (14 years ago)
Author:
nikrou
Message:

Feature 1241 resolved. replace mysql_fetch_array by mysql_fetch_assoc for small php code improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions.inc.php

    r3750 r4265  
    4545  // columns are 'Field', 'Type'
    4646  $result = pwg_query('desc '.$table);
    47   while ($row = mysql_fetch_array($result))
     47  while ($row = mysql_fetch_assoc($result))
    4848  {
    4949    // we are only interested in the the field given in parameter for the
     
    936936
    937937  $result = pwg_query($query);
    938   while ($row = mysql_fetch_array($result))
     938  while ($row = mysql_fetch_assoc($result))
    939939  {
    940940    array_push($array, $row[$fieldname]);
     
    11221122  WHERE '.$conf['user_fields']['id'].' = '.$conf['webmaster_id'].'
    11231123;';
    1124   list($email) = mysql_fetch_array(pwg_query($query));
     1124  list($email) = mysql_fetch_row(pwg_query($query));
    11251125
    11261126  return $email;
     
    11481148  }
    11491149
    1150   while ($row = mysql_fetch_array($result))
     1150  while ($row = mysql_fetch_assoc($result))
    11511151  {
    11521152    $conf[ $row['param'] ] = isset($row['value']) ? $row['value'] : '';
     
    11931193
    11941194  $result = pwg_query($query);
    1195   while ($row = mysql_fetch_array($result))
     1195  while ($row = mysql_fetch_assoc($result))
    11961196  {
    11971197    $array[ $row[$keyname] ] = $row[$valuename];
     
    15851585    // Use MySql date in order to standardize all recent "actions/queries"
    15861586    list($cache['get_icon']['sql_recent_date']) =
    1587       mysql_fetch_array(pwg_query('select SUBDATE(
     1587      mysql_fetch_row(pwg_query('select SUBDATE(
    15881588      CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)'));
    15891589  }
Note: See TracChangeset for help on using the changeset viewer.