Esempio n. 1
0
 function set(City $city)
 {
     //return $this->bd->update($this->tabla, $city->get());
     $paramsWhere = array();
     $paramsWhere["ID"] = $city->getID();
     return $this->bd->update($this->tabla, $city->get(), $paramsWhere);
 }
Esempio n. 2
0
 function set(City $city)
 {
     //Update de todos los campos menos el id, el id se usara como el where para el update numero de filas modificadas
     $parametrosSet = array();
     $parametrosSet['Name'] = $city->getName();
     $parametrosSet['CountryCode'] = $city->getCountryCode();
     $parametrosSet['District'] = $city->getDistrict();
     $parametrosSet['Population'] = $city->getPopulation();
     $parametrosWhere = array();
     $parametrosWhere['ID'] = $city->getID();
     return $this->bd->update($this->tabla, $parametrosSet, $parametrosWhere);
 }
Esempio n. 3
0
 function erase(City $city)
 {
     //borrar por nombre
     //dice ele numero de filas borratas
     return $this->delete($city->getID());
 }