Changeset 538 for trunk/includes/Database.php
- Timestamp:
- May 14, 2013, 9:21:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/Database.php
r525 r538 38 38 var $ShowSQLQuery = false; 39 39 40 function __construct($Host, $User, $Password, $Database) 40 function __construct() 41 { 42 } 43 44 function Connect($Host, $User, $Password, $Database) 41 45 { 42 46 if($this->Type == 'mysql') $ConnectionString = 'mysql:host='.$Host.';dbname='.$Database; … … 61 65 { 62 66 $Result->num_rows = $Result->PDOStatement->rowCount(); 67 $this->insert_id = $this->PDO->lastInsertId(); 63 68 } else 64 69 { … … 66 71 $this->Error = $this->Error[2]; 67 72 if(($this->Error != '') and ($this->ShowSQLError == true)) 68 {69 73 echo('<div><strong>SQL Error: </strong>'.$this->Error.'<br />'.$Query.'</div>'); 70 echo(debug_backtrace()); 71 } 74 throw new Exception('SQL Error: '.$this->Error); 72 75 } 73 $this->insert_id = $this->PDO->lastInsertId();74 76 return($Result); 75 77 }
Note:
See TracChangeset
for help on using the changeset viewer.