Ignore:
Timestamp:
Nov 20, 2009, 3:17:04 PM (14 years ago)
Author:
nikrou
Message:

Feature 1244 resolved
Replace all mysql functions in core code by ones independant of database engine

Fix small php code synxtax : hash must be accessed with [ ] and not { }.

File:
1 edited

Legend:

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

    r4265 r4325  
    102102  $cats = array();
    103103  $selected_category = isset($page['category']) ? $page['category'] : null;
    104   while ($row = mysql_fetch_assoc($result))
     104  while ($row = pwg_db_fetch_assoc($result))
    105105  {
    106106    $child_date_last = @$row['max_date_last']> @$row['date_last'];
     
    166166  WHERE id = '.$id.'
    167167;';
    168   $cat = mysql_fetch_assoc(pwg_query($query));
     168  $cat = pwg_db_fetch_assoc(pwg_query($query));
    169169  if (empty($cat))
    170170    return null;
     
    241241    $query.= ' FROM '.CATEGORIES_TABLE.' WHERE id = '.$category_id;
    242242    $query.= ';';
    243     $row = mysql_fetch_assoc( pwg_query( $query ) );
     243    $row = pwg_db_fetch_assoc( pwg_query( $query ) );
    244244    $uppercats = $row['uppercats'];
    245245  }
     
    252252  $query.= ';';
    253253  $result = pwg_query( $query );
    254   while( $row = mysql_fetch_assoc( $result ) )
     254  while( $row = pwg_db_fetch_assoc( $result ) )
    255255  {
    256256    $database_dirs[$row['id']] = $row['dir'];
     
    276276    AND c.id = '.$category_id.'
    277277;';
    278   $row = mysql_fetch_assoc(pwg_query($query));
     278  $row = pwg_db_fetch_assoc(pwg_query($query));
    279279  return $row['galleries_url'];
    280280}
     
    345345  if (!empty($result))
    346346  {
    347     while ($row = mysql_fetch_assoc($result))
     347    while ($row = pwg_db_fetch_assoc($result))
    348348    {
    349349      array_push($categories, $row);
     
    385385
    386386  $subcats = array();
    387   while ($row = mysql_fetch_assoc($result))
     387  while ($row = pwg_db_fetch_assoc($result))
    388388  {
    389389    array_push($subcats, $row['id']);
     
    534534LIMIT 1';
    535535
    536       $show_link = mysql_num_rows(pwg_query($query)) <> 0;
     536      $show_link = pwg_db_num_rows(pwg_query($query)) <> 0;
    537537    }
    538538  }
Note: See TracChangeset for help on using the changeset viewer.