Ignore:
Timestamp:
Oct 30, 2004, 5:42:29 PM (20 years ago)
Author:
z0rglub
Message:
  • function mysql_query replaced by pwg_query : the same with debugging features
  • by default, DEBUG is set to 0 (off)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/picture_modify.php

    r579 r587  
    8383  $query.= ' WHERE id = '.$_GET['image_id'];
    8484  $query.= ';';
    85   mysql_query($query);
     85  pwg_query($query);
    8686  // make the picture representative of a category ?
    8787  $query = '
     
    9191    AND image_id = '.$_GET['image_id'].'
    9292;';
    93   $result = mysql_query($query);
     93  $result = pwg_query($query);
    9494  while ($row = mysql_fetch_array($result))
    9595  {
     
    103103      $query.= ' WHERE id = '.$row['category_id'];
    104104      $query.= ';';
    105       mysql_query($query);
     105      pwg_query($query);
    106106    }
    107107    // if the user ask this picture to be not any more the representative,
     
    115115  WHERE id = '.$row['category_id'].'
    116116;';
    117       mysql_query($query);
     117      pwg_query($query);
    118118    }
    119119  }
     
    134134  WHERE id = '.$_POST['associate'].'
    135135;';
    136       if (mysql_num_rows(mysql_query($query)) == 0)
     136      if (mysql_num_rows(pwg_query($query)) == 0)
    137137        array_push($errors, $lang['cat_unknown_id']);
    138138    }
     
    148148  ('.$_POST['associate'].','.$_GET['image_id'].')
    149149;';
    150     mysql_query($query);
     150    pwg_query($query);
    151151    $associate_or_dissociate = true;
    152152    update_category($_POST['associate']);
     
    159159  WHERE image_id = '.$_GET['image_id'].'
    160160;';
    161   $result = mysql_query($query);
     161  $result = pwg_query($query);
    162162  while ($row = mysql_fetch_array($result))
    163163  {
     
    169169  AND category_id = '.$row['category_id'].'
    170170;';
    171       mysql_query($query);
     171      pwg_query($query);
    172172      $associate_or_dissociate = true;
    173173      update_category($row['category_id']);
     
    186186  WHERE id = '.$_GET['image_id'].'
    187187;';
    188 $row = mysql_fetch_array(mysql_query($query));
     188$row = mysql_fetch_array(pwg_query($query));
    189189
    190190if (empty($row['name']))
     
    217217    AND category_id = id
    218218;';
    219 $result = mysql_query($query);
     219$result = pwg_query($query);
    220220$categories = '';
    221221while ($cat_row = mysql_fetch_array($result))
     
    287287$query = 'SELECT COUNT(id) AS nb_total_categories';
    288288$query.= ' FROM '.CATEGORIES_TABLE.';';
    289 $row = mysql_fetch_array(mysql_query($query));
     289$row = mysql_fetch_array(pwg_query($query));
    290290if ($row['nb_total_categories'] < $conf['max_LOV_categories'])
    291291{
Note: See TracChangeset for help on using the changeset viewer.