public function exec($query) { array_push($this->logs, $query); Log::sql($this->last_query()); array_push($this->queries, $this->last_query()); return parent::exec($query); }
function connectDb() { require_once "../vendor/medoo/medoo.php"; $config = getConfig(); $connection = new medoo($config['database']); $connection->exec("SET sql_mode=`ANSI_QUOTES`;"); return $connection; }
/** * @param $query * @return int */ public function exec($query) { return $this->_writer->exec($query); }