Changeset 769 for trunk/includes/Database.php
- Timestamp:
- Jan 31, 2014, 12:23:31 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/Database.php
r765 r769 63 63 function query($Query) 64 64 { 65 if( $this->ShowSQLQuery == true) $QueryStartTime = microtime();65 if(($this->ShowSQLQuery == true) or ($this->LogSQLQuery == true)) $QueryStartTime = microtime(); 66 66 $this->LastQuery = $Query; 67 if($this->LogSQLQuery == true)68 file_put_contents($this->LogFile, $Query."\n", FILE_APPEND);69 67 $Result = new DatabaseResult(); 70 68 $Result->PDOStatement = $this->PDO->query($Query); 69 if(($this->ShowSQLQuery == true) or ($this->LogSQLQuery == true)) 70 $Duration = ' ; '.(microtime() - $QueryStartTime). ' s'; 71 if($this->LogSQLQuery == true) 72 file_put_contents($this->LogFile, $Query.$Duration."\n", FILE_APPEND); 71 73 if($this->ShowSQLQuery == true) 72 {73 $Duration = ' ; '.(microtime() - $QueryStartTime). ' s';74 74 echo('<div style="border-bottom-width: 1px; border-bottom-style: solid; padding-bottom: 3px; padding-top: 3px; font-size: 12px; font-family: Arial;">'.$Query.$Duration.'</div>'."\n"); 75 }76 75 if($Result->PDOStatement) 77 76 {
Note:
See TracChangeset
for help on using the changeset viewer.