public function exec($query) { $log = new jSQLLogMessage($query); $result = parent::exec($query); $log->endQuery(); jLog::log($log, 'sql'); return $result; }
/** * Launch a SQL Query (update, delete..) which doesn't return rows * @param string $query the SQL query * @return integer the number of affected rows. False if the query has failed. */ public function exec($query) { $this->lastQuery = $query; if ($this->_debugMode) { $log = new jSQLLogMessage($query); $result = $this->_doExec($query); $log->endQuery(); jLog::log($log, 'sql'); return $result; } else { return $this->_doExec($query); } }
/** * Launch a SQL Query (update, delete..) which doesn't return rows * @param string $query the SQL query * @return integer the number of affected rows. False if the query has failed. */ public function exec($query) { $this->lastQuery = $query; #if ENABLE_OPTIMIZED_SOURCE return $this->_doExec($query); #else $log = new jSQLLogMessage($query); $result = $this->_doExec($query); $log->endQuery(); jLog::log($log, 'sql'); return $result; #endif }