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;
     }
 }
Esempio n. 2
0
 function insert(Lugar $lugar)
 {
     //devuelve el id del lugar insertado
     $parametrosSet = array();
     $parametrosSet["ID_lugar"] = $lugar->getID_lugar();
     $parametrosSet["nombre"] = $lugar->getNombre();
     $parametrosSet["aforo"] = $lugar->getAforo();
     return $this->bd->insert($this->tabla, $parametrosSet);
 }
Esempio n. 3
0
 /**
  * Resets all references to other model objects or collections of model objects.
  *
  * This method is a user-space workaround for PHP's inability to garbage collect
  * objects with circular references (even in PHP 5.3). This is currently necessary
  * when using Propel in certain daemon or large-volume/high-memory operations.
  *
  * @param boolean $deep Whether to also clear the references on all referrer objects.
  */
 public function clearAllReferences($deep = false)
 {
     if ($deep && !$this->alreadyInClearAllReferencesDeep) {
         $this->alreadyInClearAllReferencesDeep = true;
         if ($this->collTraspasodetalless) {
             foreach ($this->collTraspasodetalless as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->aLugarRelatedByIdlugardestinatario instanceof Persistent) {
             $this->aLugarRelatedByIdlugardestinatario->clearAllReferences($deep);
         }
         if ($this->aLugarRelatedByIdlugarremitente instanceof Persistent) {
             $this->aLugarRelatedByIdlugarremitente->clearAllReferences($deep);
         }
         if ($this->aOrdencompra instanceof Persistent) {
             $this->aOrdencompra->clearAllReferences($deep);
         }
         $this->alreadyInClearAllReferencesDeep = false;
     }
     // if ($deep)
     if ($this->collTraspasodetalless instanceof PropelCollection) {
         $this->collTraspasodetalless->clearIterator();
     }
     $this->collTraspasodetalless = null;
     $this->aLugarRelatedByIdlugardestinatario = null;
     $this->aLugarRelatedByIdlugarremitente = null;
     $this->aOrdencompra = null;
 }
Esempio n. 4
0
 /**
  * Resets all references to other model objects or collections of model objects.
  *
  * This method is a user-space workaround for PHP's inability to garbage collect
  * objects with circular references (even in PHP 5.3). This is currently necessary
  * when using Propel in certain daemon or large-volume/high-memory operations.
  *
  * @param boolean $deep Whether to also clear the references on all referrer objects.
  */
 public function clearAllReferences($deep = false)
 {
     if ($deep && !$this->alreadyInClearAllReferencesDeep) {
         $this->alreadyInClearAllReferencesDeep = true;
         if ($this->collCargoadmisions) {
             foreach ($this->collCargoadmisions as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->collCargoconsultas) {
             foreach ($this->collCargoconsultas as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->collCargoventas) {
             foreach ($this->collCargoventas as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->collTraspasodetalless) {
             foreach ($this->collTraspasodetalless as $o) {
                 $o->clearAllReferences($deep);
             }
         }
         if ($this->aLugar instanceof Persistent) {
             $this->aLugar->clearAllReferences($deep);
         }
         if ($this->aOrdencompradetalle instanceof Persistent) {
             $this->aOrdencompradetalle->clearAllReferences($deep);
         }
         $this->alreadyInClearAllReferencesDeep = false;
     }
     // if ($deep)
     if ($this->collCargoadmisions instanceof PropelCollection) {
         $this->collCargoadmisions->clearIterator();
     }
     $this->collCargoadmisions = null;
     if ($this->collCargoconsultas instanceof PropelCollection) {
         $this->collCargoconsultas->clearIterator();
     }
     $this->collCargoconsultas = null;
     if ($this->collCargoventas instanceof PropelCollection) {
         $this->collCargoventas->clearIterator();
     }
     $this->collCargoventas = null;
     if ($this->collTraspasodetalless instanceof PropelCollection) {
         $this->collTraspasodetalless->clearIterator();
     }
     $this->collTraspasodetalless = null;
     $this->aLugar = null;
     $this->aOrdencompradetalle = null;
 }
 /**
  * Resets all references to other model objects or collections of model objects.
  *
  * This method is a user-space workaround for PHP's inability to garbage collect
  * objects with circular references (even in PHP 5.3). This is currently necessary
  * when using Propel in certain daemon or large-volume/high-memory operations.
  *
  * @param boolean $deep Whether to also clear the references on all referrer objects.
  */
 public function clearAllReferences($deep = false)
 {
     if ($deep && !$this->alreadyInClearAllReferencesDeep) {
         $this->alreadyInClearAllReferencesDeep = true;
         if ($this->aArticulovariante instanceof Persistent) {
             $this->aArticulovariante->clearAllReferences($deep);
         }
         if ($this->aLugar instanceof Persistent) {
             $this->aLugar->clearAllReferences($deep);
         }
         $this->alreadyInClearAllReferencesDeep = false;
     }
     // if ($deep)
     $this->aArticulovariante = null;
     $this->aLugar = null;
 }
Esempio n. 6
0
 /**
  * Filter the query by a related Lugar object
  *
  * @param   Lugar|PropelObjectCollection $lugar The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 TraspasoQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByLugarRelatedByIdlugarremitente($lugar, $comparison = null)
 {
     if ($lugar instanceof Lugar) {
         return $this->addUsingAlias(TraspasoPeer::IDLUGARREMITENTE, $lugar->getIdlugar(), $comparison);
     } elseif ($lugar instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(TraspasoPeer::IDLUGARREMITENTE, $lugar->toKeyValue('PrimaryKey', 'Idlugar'), $comparison);
     } else {
         throw new PropelException('filterByLugarRelatedByIdlugarremitente() only accepts arguments of type Lugar or PropelCollection');
     }
 }
Esempio n. 7
0
 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param Lugar $obj A Lugar object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool($obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getIdlugar();
         }
         // if key === null
         LugarPeer::$instances[$key] = $obj;
     }
 }
Esempio n. 8
0
<?php

require_once '../negocio/Lugar.php';
require_once '../util/Funciones.clase.php';
$l_nombre = $_POST["l_nombre"];
$l_latitud = $_POST["l_latitud"];
$l_longitud = $_POST["l_longitud"];
$user_dni = $_POST["user_dni"];
$id_categoria = $_POST["id_categoria"];
if (isset($l_nombre) && isset($l_latitud) && isset($l_longitud) && isset($user_dni) && isset($id_categoria)) {
    try {
        $obj = new Lugar();
        $resultado = $obj->registrarLocal($l_nombre, $l_latitud, $l_longitud, $user_dni, $id_categoria);
        if ($resultado) {
            Funciones::imprimeJSON(200, "Registro estado correcto", $resultado);
        } else {
            Funciones::imprimeJSON(500, "Surgió un problema inténlo luego", $resultado);
        }
    } catch (Exception $exc) {
        Funciones::imprimeJSON(500, $exc->getMessage(), "");
    }
} else {
    $error = array('estado' => 500, 'mesaje' => "Error al Ingresar los Datos!", 'datos' => "");
    echo json_encode($error);
}
Esempio n. 9
0
 /**
  * Exclude object from result
  *
  * @param   Lugar $lugar Object to remove from the list of results
  *
  * @return LugarQuery The current query, for fluid interface
  */
 public function prune($lugar = null)
 {
     if ($lugar) {
         $this->addUsingAlias(LugarPeer::IDLUGAR, $lugar->getIdlugar(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Esempio n. 10
0
<?php

//require_once 'sesion.controlador.php';
/*AUTOR: ROA SÁNCHEZ, ROY*/
require_once '../negocio/Lugar.php';
require_once '../util/Funciones.clase.php';
$id_lugar = $_POST["id_lugar"];
try {
    $obj = new Lugar();
    if ($id_lugar != "") {
        $resultado = $obj->listarLugarID($id_lugar);
    } else {
        $resultado = $obj->listarLugares();
    }
    Funciones::imprimeJSON(200, "", $resultado);
} catch (Exception $exc) {
    Funciones::imprimeJSON(500, $exc->getMessage(), "");
}
<?php

require_once '../negocio/Lugar.php';
require_once '../util/Funciones.clase.php';
$id_categoria = $_POST["id_categoria"];
$id_lugar = $_POST["id_lugar"];
if (isset($id_categoria) && isset($id_lugar)) {
    try {
        $obj = new Lugar();
        $resultado = $obj->recomendarLugares($id_categoria, $id_lugar);
        Funciones::imprimeJSON(200, "", $resultado);
    } catch (Exception $exc) {
        Funciones::imprimeJSON(500, $exc->getMessage(), "");
    }
} else {
    $error = array('estado' => 500, 'mesaje' => "No ha ingresado un ID para categoría", 'datos' => "");
    echo json_encode($error);
}
 /**
  * Filter the query by a related Lugar object
  *
  * @param   Lugar|PropelObjectCollection $lugar The related object(s) to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return                 ArticulovariantereordenQuery The current query, for fluid interface
  * @throws PropelException - if the provided filter is invalid.
  */
 public function filterByLugar($lugar, $comparison = null)
 {
     if ($lugar instanceof Lugar) {
         return $this->addUsingAlias(ArticulovariantereordenPeer::IDLUGAR, $lugar->getIdlugar(), $comparison);
     } elseif ($lugar instanceof PropelObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ArticulovariantereordenPeer::IDLUGAR, $lugar->toKeyValue('PrimaryKey', 'Idlugar'), $comparison);
     } else {
         throw new PropelException('filterByLugar() only accepts arguments of type Lugar or PropelCollection');
     }
 }