public static function debug($message) { echo $message . PHP_EOL; GWF_Log::rawLog('dog/debug', $message); GWF_Log::flush(); return true; }
public function queryRead($query) { $t = microtime(true); if (false === ($result = mysql_query($query, $this->link))) { $this->error($query, mysql_errno($this->link), mysql_error($this->link)); return false; } $time = microtime(true) - $t; $this->query_time += $time; $this->query_count++; $this->queries_opened++; if (GDO_Database::DEBUG) { GWF_Log::rawLog(self::DEBUG_PATH, sprintf('Q#%03d(%.03fs): %s', $this->query_count, $time, $query)); } return $result; }