/** * @see RedBean_Adapter::exec */ public function exec($sql, $bindings = array(), $noevent = FALSE) { if (!$noevent) { $this->sql = $sql; $this->signal('sql_exec', $this); } return $this->db->Execute($sql, $bindings); }
/** * Executes SQL code; any query without * returning a resultset. * This function allows you to provide an array with values to bind * to query parameters. For instance you can bind values to question * marks in the query. Each value in the array corresponds to the * question mark in the query that matches the position of the value in the * array. You can also bind values using explicit keys, for instance * array(":key"=>123) will bind the integer 123 to the key :key in the * SQL. * * @param string $sql SQL Code to execute * @param array $values assoc. array binding values * @param boolean $noevent if TRUE this will suppress the event 'sql_exec' * * @return mixed $undefSet whatever driver returns, undefined */ public function exec($sql, $aValues = array(), $noevent = false) { if (!$noevent) { $this->sql = $sql; $this->signal("sql_exec", $this); } return $this->db->Execute($sql, $aValues); }
/** * Executes SQL code; any query without * returning a resultset. * This function allows you to provide an array with values to bind * to query parameters. For instance you can bind values to question * marks in the query. Each value in the array corresponds to the * question mark in the query that matches the position of the value in the * array. You can also bind values using explicit keys, for instance * array(":key"=>123) will bind the integer 123 to the key :key in the * SQL. * * @param string $sql SQL Code to execute * @param array $values assoc. array binding values * @param boolean $noevent if TRUE this will suppress the event 'sql_exec' * * @return mixed $undefSet whatever driver returns, undefined */ public function exec($sql, $aValues = array(), $noevent = false) { if (!$noevent) { $this->sql = $sql; $this->signal('sql_exec', $this); } $timer = new $this->performanceTimerClass(PerformanceTimer::CATEGORY_SQL); $timer->startTimer(); $res = $this->db->Execute($sql, $aValues); $timer->stopTimer(); $timer->saveTime(); return $res; }