Beispiel #1
0
 function getListCountryCityCountryLanguage($condicion = null, $parametros = array())
 {
     if ($condicion === null) {
         $condicion = "";
     } else {
         $condicion = "where {$condicion}";
     }
     $sql = " select co.*, ci.*, cl.*\r\n                    from country co\r\n                    left join city ci\r\n                    on co.Code = ci.CountryCode\r\n                    left join countrylanguage cl \r\n                    on co.Code =  cl.CountryCode {$condicion}";
     $this->bd->send($sql, $parametros);
     $r = array();
     $contador = 0;
     while ($fila = $this->bd->getRow()) {
         $country = new Cuidador();
         $country->set($fila);
         $city = new Animal();
         $city->set($fila, 15);
         //el numero es a partir del ultimo campo de country, para que coja los de city
         //$countrylanguage = new CountryLanguage();
         //$countrylanguage->set($fila, 20);
         $r[$contador]["country"] = $country;
         $r[$contador]["city"] = $city;
         //$r[$contador]["countrylanguage"]=$countrylanguage;
         $contador++;
     }
     return $r;
 }
 function getListCountryCityCountryLanguage($condicion = null, $parametros = array())
 {
     if ($condicion === null) {
         $condicion = "";
     } else {
         $condicion = "where {$condicion}";
     }
     $sql = " select co.*, ci.*, cl.*\r\n                    from country co\r\n                    left join city ci\r\n                    on co.Code = ci.CountryCode\r\n                    left join countrylanguage cl \r\n                    on co.Code =  cl.CountryCode {$condicion}";
     $this->bd->send($sql, $parametros);
     $r = array();
     while ($fila = $this->bd->getRow()) {
         $country = new Cuidador();
         $country->set($fila);
         $city = new Animal();
         $city->set($fila, 15);
         $countrylanguage = new CountryLanguage();
         $countrylanguage->set($fila, 20);
         $r[] = new CountryCityCountryLanguage($country, $city, $countrylanguage);
     }
     return $r;
 }
Beispiel #3
0
 function insert(Cuidador $IDCuidador)
 {
     $parametros = $IDCuidador->getArray();
     return $this->bd->insert($this->tabla, $parametros, false);
 }
Beispiel #4
0
<?php

require '../clases/AutoCarga.php';
$bd = new DataBase();
$gestor = new ManageCuidador($bd);
$cuidador = new Cuidador();
$cuidador->read();
$r = $gestor->insert($cuidador);
$bd->close();
echo $r;
var_dump($bd->getError());
header("Location:index.php?op=insert&r={$r}");
Beispiel #5
0
<?php

require '../clases/AutoCarga.php';
$bd = new DataBase();
$gestor = new ManageCuidador($bd);
$zona = new Cuidador();
$zona->read();
$pkCode = Request::post("pkCode");
$r = $gestor->set($zona, $pkCode);
$bd->close();
echo $r;
var_dump($bd->getError());
header("Location:index.php?op=edit&r={$r}");