Ejemplo n.º 1
0
 function getList($p = 0, $rpp = 3, $condicion = "1=1", $parametro = array(), $orderby = "1")
 {
     $principio = $p * $rpp;
     $list = array();
     $sql = "select * from {$this->tabla} where {$condicion} order by {$orderby} limit {$principio},{$rpp}";
     $r = $this->bd->setConsulta($sql, $parametro);
     if ($r) {
         while ($fila = $this->bd->getFila()) {
             $venta = new Venta();
             $venta->set($fila);
             $list[] = $venta;
         }
     } else {
         return null;
     }
     return $list;
 }