Changeset 34 for branches


Ignore:
Timestamp:
Oct 14, 2008, 9:25:52 PM (16 years ago)
Author:
maron
Message:

debug

Location:
branches/3/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3/class/database.php

    r32 r34  
    1010  var $LastDataSet;
    1111  var $LastNumRows;
     12  var $Debug = true;
    1213 
    1314  function query($Query)
     
    2122    $this->LastQuery = "SELECT ".$What." FROM `".$this->Prefix.$Table."` WHERE ".$Condition;
    2223    $resul = $this->query($this->LastQuery);
    23     if ($this->error <> '') $this->error.': '.$this->LastQuery;
     24    if ($this->error <> '' and $Debug) $this->error.': '.$this->LastQuery;
    2425   
    2526    $this->LastNumRows = $resul->num_rows;
     
    3637    $this->LastQuery = "DELETE FROM `".$this->Prefix.$Table."` WHERE ".$Condition;
    3738    $this->query($this->LastQuery); 
     39    if ($this->error <> '' and $Debug) $this->error.': '.$this->LastQuery;
    3840  }
    3941 
     
    5355    $this->LastQuery = 'INSERT INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')';
    5456    $this->query($this->LastQuery);
     57    if ($this->error <> '' and $Debug) $this->error.': '.$this->LastQuery;
    5558  }
    5659 
     
    6770    $this->LastQuery = 'UPDATE `'.$this->Prefix.$Table.'` SET '.$Values.' WHERE ('.$Condition.')';
    6871    $this->query($this->LastQuery);
     72    if ($this->error <> '' and $Debug) $this->error.': '.$this->LastQuery;
    6973  }
    7074 
  • branches/3/class/user.php

    r29 r34  
    55        // variables
    66        var $ID,$user,$Database;
    7           var $AnonymousUserId = 1;
     7          var $AnonymousUserId = 0;
    88        var $DefaultRole = 2;
    99        var $IPAddress = ' ';
Note: See TracChangeset for help on using the changeset viewer.