Exemplo n.º 1
0
 public function SetProperty($RowID, $Property, $ForceValue = FALSE)
 {
     if (!isset($this->Schema)) {
         $this->DefineSchema();
     }
     $PrimaryKey = $this->PrimaryKey;
     if ($ForceValue !== FALSE) {
         $Value = $ForceValue;
     } else {
         $Row = $this->GetID($RowID);
         $Value = $Row->{$Property} == '1' ? '0' : '1';
     }
     $this->SQL->Update($this->Name)->Set($Property, $Value)->Where($PrimaryKey, $RowID)->Put();
     return $Value;
 }