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_category.inc.php

    r3282 r4265  
    241241    $query.= ' FROM '.CATEGORIES_TABLE.' WHERE id = '.$category_id;
    242242    $query.= ';';
    243     $row = mysql_fetch_array( pwg_query( $query ) );
     243    $row = mysql_fetch_assoc( pwg_query( $query ) );
    244244    $uppercats = $row['uppercats'];
    245245  }
     
    252252  $query.= ';';
    253253  $result = pwg_query( $query );
    254   while( $row = mysql_fetch_array( $result ) )
     254  while( $row = mysql_fetch_assoc( $result ) )
    255255  {
    256256    $database_dirs[$row['id']] = $row['dir'];
     
    276276    AND c.id = '.$category_id.'
    277277;';
    278   $row = mysql_fetch_array(pwg_query($query));
     278  $row = mysql_fetch_assoc(pwg_query($query));
    279279  return $row['galleries_url'];
    280280}
     
    385385
    386386  $subcats = array();
    387   while ($row = mysql_fetch_array($result))
     387  while ($row = mysql_fetch_assoc($result))
    388388  {
    389389    array_push($subcats, $row['id']);
Note: See TracChangeset for help on using the changeset viewer.