コード例 #1
0
 public function exec($query)
 {
     $log = new jSQLLogMessage($query);
     $result = parent::exec($query);
     $log->endQuery();
     jLog::log($log, 'sql');
     return $result;
 }
コード例 #2
0
ファイル: jDbConnection.class.php プロジェクト: rodacom/jelix
 /**
  * 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);
     }
 }
コード例 #3
0
 /**
  * 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
 }