Changeset 424 for branches/Modular/Common/Database.php
- Timestamp:
- Oct 10, 2012, 9:29:20 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Modular/Common/Database.php
r401 r424 70 70 $this->Error = $E->getMessage(); 71 71 if(($this->Error != '') and ($this->ShowSQLError == true)) 72 echo('<div><strong>SQL Error: </strong>'.$this->Error.'<br />'.$Query.'</div>'); 72 //echo('<div><strong>SQL Error: </strong>'.$this->Error.'<br />'.$Query.'</div>'); 73 throw new Exception($this->Error); 73 74 } 74 75 return($Result); … … 82 83 function delete($Table, $Condition) 83 84 { 84 $this-> PDO->query('DELETE FROM `'.$this->Prefix.$Table.'` WHERE '.$Condition);85 $this->query('DELETE FROM `'.$this->Prefix.$Table.'` WHERE '.$Condition); 85 86 } 86 87 … … 97 98 $Name = substr($Name, 1); 98 99 $Values = substr($Values, 1); 99 $this-> PDO->query('INSERT INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')');100 $this->query('INSERT INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')'); 100 101 $this->insert_id = $this->PDO->lastInsertId(); 101 102 } … … 110 111 } 111 112 $Values = substr($Values, 2); 112 $this-> PDO->query('UPDATE `'.$this->Prefix.$Table.'` SET '.$Values.' WHERE ('.$Condition.')');113 $this->query('UPDATE `'.$this->Prefix.$Table.'` SET '.$Values.' WHERE ('.$Condition.')'); 113 114 } 114 115 … … 126 127 $Values = substr($Values, 1); 127 128 //echo('REPLACE INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES ('.$Values.')<br />'); 128 $this-> PDO->query('REPLACE INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')');129 $this->query('REPLACE INTO `'.$this->Prefix.$Table.'` ('.$Name.') VALUES('.$Values.')'); 129 130 //echo($this->error().'<br>'); 130 131 } … … 132 133 function charset($Charset) 133 134 { 134 $this-> PDO->query('SET NAMES "'.$Charset.'"');135 $this->query('SET NAMES "'.$Charset.'"'); 135 136 } 136 137
Note:
See TracChangeset
for help on using the changeset viewer.