src/DataBaseAR.php
protected function prepareSelect($select, $from, $where='', $group='', $having='', $order='', $limit=''){     
        $sql= "SELECT " . $select;
        $sql.= " FROM " . $from;
        if($where != '' && $where != NULL){$sql.= " WHERE " . $where;}        
        $sql.= $group;
        if($having != '' && $having != NULL){$sql.= " HAVING " . $having;}
        $sql.= $order;
        $sql.= $limit;
        //Preparo la consulta y la retorno
        return $this->connection->prepare($sql);
    }
protected function prepareSelect($select, $from, $where='', $group='', $having='', $order='', $limit=''){     
        $sql= "SELECT " . $select;
        $sql.= " FROM " . $from;
        if($where != '' && $where != NULL){$sql.= " WHERE " . $where;}        
        $sql.= $group;
        if($having != '' && $having != NULL){$sql.= " HAVING " . $having;}
        $sql.= $order;
        $sql.= $limit;
        //Preparo la consulta y la retorno
        return $this->connection->prepare($sql);
    }
protected function prepareSelect ( $ select , $ from , $ where = '' , $ group = '' , $ having = '' , $ order = '' , $ limit = '' ) { $ sql = "SELECT " . $ select ; $ sql .= " FROM " . $ from ; if ( $ where != '' && $ where != NULL ) { $ sql .= " WHERE " . $ where ; } $ sql .= $ group ; if ( $ having != '' && $ having != NULL ) { $ sql .= " HAVING " . $ having ; } $ sql .= $ order ; $ sql .= $ limit ; //Preparo la consulta y la retorno return $ this -> connection -> prepare ( $ sql ) ; }
Retorna un PDOStatement SELECT armado en base a los parametros pasados
@param string $select
@param string $from
@param string $where
@param string $group
@param string $having
@param string $order
@param string $limit
return PDOStatement
Retorna un PDOStatement SELECT armado en base a los parametros pasados