Daniia/Daniia.php
final public function query( string $sql, $closure=NULL ) {
      $this->connection();
      $this->last_sql = $this->sql = $sql;
      $this->fetch();
      $this->data = $this->rows;
      $this->reset();
      if ($closure instanceof \Closure) {
         $this->data = $closure( $this->data, $this );
      }
      return $this->data ?: [];
   }
final public function query( string $sql, $closure=NULL ) {
      $this->connection();
      $this->last_sql = $this->sql = $sql;
      $this->fetch();
      $this->data = $this->rows;
      $this->reset();
      if ($closure instanceof \Closure) {
         $this->data = $closure( $this->data, $this );
      }
      return $this->data ?: [];
   }
final public function query ( string $ sql , $ closure = NULL ) { $ this -> connection ( ) ; $ this -> last_sql = $ this -> sql = $ sql ; $ this -> fetch ( ) ; $ this -> data = $ this -> rows ; $ this -> reset ( ) ; if ( $ closure instanceof \ Closure ) { $ this -> data = $ closure ( $ this -> data , $ this ) ; } return $ this -> data ? : [ ] ; }
Ejecuta una sentencia SQL, devolviendo un conjunto de resultados como un objeto
@author Carlos Garcia
@param String $sql
@return Array
Ejecuta una sentencia SQL devolviendo un conjunto de resultados como un objeto