Changeset 501 for trunk/Common/Database.php
- Timestamp:
- Mar 10, 2013, 8:15:46 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Database.php
r486 r501 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; … … 66 70 $this->Error = $this->Error[2]; 67 71 if(($this->Error != '') and ($this->ShowSQLError == true)) 68 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('SQL Error: </strong>'.$this->Error.', Query: '.$Query); 69 74 } 70 75 return($Result);
Note:
See TracChangeset
for help on using the changeset viewer.