Changeset 542 for trunk/includes/Database.php
- Timestamp:
- Jun 17, 2013, 10:42:13 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/Database.php
r540 r542 28 28 class Database 29 29 { 30 var $Prefix = '';31 var $Functions = array('NOW()', 'CURDATE()', 'CURTIME()', 'UUID()');32 var $Type = 'mysql'; // mysql, pgsql30 var $Prefix; 31 var $Functions; 32 var $Type; 33 33 var $PDO; 34 var $Error = '';34 var $Error; 35 35 var $insert_id; 36 var $LastQuery = ''; 37 var $ShowSQLError = false; 38 var $ShowSQLQuery = false; 36 var $LastQuery; 37 var $ShowSQLError; 38 var $ShowSQLQuery; 39 var $LogFile; 39 40 40 41 function __construct() 41 42 { 43 $this->Functions = array('NOW()', 'CURDATE()', 'CURTIME()', 'UUID()'); 44 $this->Type = 'mysql'; // mysql, pgsql 45 $this->ShowSQLError = false; 46 $this->ShowSQLQuery = false; 47 $this->LogSQLQuery = false; 48 $this->LogFile = 'Query.log'; 42 49 } 43 50 … … 60 67 if($this->ShowSQLQuery == true) 61 68 echo('<div style="border-bottom-width: 1px; border-bottom-style: solid; padding-bottom: 3px; padding-top: 3px; font-size: 12px; font-family: Arial;">'.$Query.'</div>'."\n"); 69 if($this->LogSQLQuery == true) 70 file_put_contents($this->LogFile, $Query."\n", FILE_APPEND); 62 71 $Result = new DatabaseResult(); 63 72 $Result->PDOStatement = $this->PDO->query($Query);
Note:
See TracChangeset
for help on using the changeset viewer.