protected function execute_internal() { APF::get_instance()->debug("MysqlAccessor execute internal:" . $this->sql); $className = $this->model_name; $this->connection = $this->get_connection($className::get_pdo_name($this)); $stmt = $this->connection->prepare($this->sql); self::$last_sql = $this->sql; APF::get_instance()->debug("MysqlAccessor pdo_values:" . print_r($this->pdo_values, true)); $stmt->execute($this->pdo_values); return $stmt; }
/** * * @return PDOStatement */ protected function execute_internal() { //var_dump($this->sql); //var_dump($this->pdo_values);die(); APF::get_instance()->debug("MysqlAccessor execute internal:" . $this->sql); //die(); $className = $this->model_name; //var_dump($className);die(); $this->connection = $this->get_connection($className::get_pdo_name($this)); //die(); $stmt = $this->connection->prepare($this->sql); APF_DB_MysqlAccessor::$last_sql = $this->sql; $stmt->execute($this->pdo_values); return $stmt; }
public static function data_access() { return APF_DB_MysqlAccessor::use_model(get_called_class()); }