function getListEventoArtistaLugar($condicion = NULL, $parametros = array()) { if ($condicion === null) { $condicion = ""; } else { // $condicion="where $condicion"; $condicion = $condicion; } /**$sql ="SELECT e.*, l.*, a.* from evento e inner join lugar l on e.ID_lugar=l.ID_lugar inner join artista a on e.ID_artista=a.ID_artista $condicion ;";*/ $sql = "SELECT *\nfrom evento e, artista a\nwhere e.ID_artista=a.ID_artista and {$condicion}"; echo "<BR>COLSUTA: " . $sql . "<BR>"; $this->bd->send($sql, $parametros); $r = array(); $contador = 0; while ($fila = $this->bd->getRow()) { $evento = new Evento(); $evento->set($fila); $lugar = new Lugar(); $lugar->set($fila, 6); $artista = new Artista(); $artista->set($fila, 9); $r[$contador]["evento"] = $evento; $r[$contador]["artista"] = $artista; $r[$contador]["lugar"] = $lugar; $contador++; return $r; } }
function getList() { $this->bd->select($this->tabla, '*', "1=1", array(), "ID_artista, nombre_artista"); $r = array(); while ($fila = $this->bd->getRow()) { $artista = new Artista(); $artista->set($fila); $r[] = $artista; } return $r; }
public function getListPage($paginaActual = 0, $nrpp = Constant::NRPP) { $this->bd->select($this->tabla, "*", "1=1", array(), "email, alias", "{$paginaActual},{$nrpp}"); $r = array(); while ($fila = $this->bd->getRow()) { $artista = new Artista(); $artista->set($fila); $r[] = $artista; } return $r; }
function getList($pagina = 1, $orden = "", $nrpp = Constants::NRPP, $condicion = "1=1", $parametros = array()) { $ordenPredeterminado = "{$orden}, fechaalta, email"; if (trim($orden) === "" || trim($orden) === null) { $ordenPredeterminado = "fechaalta, email"; } $registroInicial = ($pagina - 1) * $nrpp; $this->bd->select($this->tabla, "*", $condicion, $parametros, $ordenPredeterminado, "{$registroInicial}, {$nrpp}"); $r = array(); while ($fila = $this->bd->getRow()) { $artista = new Artista(); $artista->set($fila); $r[] = $artista; } return $r; }
function getList2($pagina = 1, $nrpp = Constant::NRPP) { $registroInicial = ($pagina - 1) * $nrpp; $this->bd->select($this->tabla, "*", "1=1", array(), "email, alias", "{$registroInicial}, {$nrpp}"); $r = array(); while ($fila = $this->bd->getRow()) { $artista = new Artista(); $artista->set($fila); $r[] = $artista; } return $r; }