public function query($query)
    {
        $statement = $this->db->prepare($query);
        $statement->execute($this->binds);

        $this->clear();

        $collection = array();

        while (false !== ($row = $statement->fetchObject())) {
            $collection[] = $this->newDataInstance($row, true);
        }

        return $collection;
    }
public function query($query)
    {
        $statement = $this->db->prepare($query);
        $statement->execute($this->binds);

        $this->clear();

        $collection = array();

        while (false !== ($row = $statement->fetchObject())) {
            $collection[] = $this->newDataInstance($row, true);
        }

        return $collection;
    }
public function query ( $ query ) { $ statement = $ this -> db -> prepare ( $ query ) ; $ statement -> execute ( $ this -> binds ) ; $ this -> clear ( ) ; $ collection = array ( ) ; while ( false !== ( $ row = $ statement -> fetchObject ( ) ) ) { $ collection [ ] = $ this -> newDataInstance ( $ row , true ) ; } return $ collection ; }
Fetch rows for specified query.

@param  string $query
@return array Array of model_base object for query.
Fetch rows for specified query .