Ejemplo n.º 1
0
 /**
  * Save given investment object (invNew) to database.
  * @param Investment $invNew
  */
 public static function EditInvestment(Investment $invNew)
 {
     $query = "UPDATE #S#investments SET no=?, number=?, name=?, description=?, short_description=?, contact=?, map_marker=?, garage=?, pool=?,\r\n\t\t\tterrace=?, air_conditioning=?, house_project=?, special=?, creation_date=?, due_date=?, total_area=?, gross_volume=?, area_from=?, area_to=?,\r\n\t\t\tprice_from=?, price_to=?, pricem2_from=?, pricem2_to=?, floor_from=?, floor_to=?, rooms_no_from=?, rooms_no_to=?, country=?, province=?, district=?,\r\n\t\t\tlocation=?, quarter=?, region=?, street=?, category=?, departments_id=?, id_lng=?  WHERE id=? AND id_lng=?;";
     $params = array($invNew->GetNo(), $invNew->GetNumber(), $invNew->GetName(), $invNew->GetDescription(), $invNew->GetShortDescription(), $invNew->GetContact(), $invNew->GetMapMarker(), $invNew->GetGarage(), $invNew->GetPool(), $invNew->GetTerrace(), $invNew->GetAirConditioning(), $invNew->GetHouseProject(), $invNew->GetSpecial(), $invNew->GetCreationDate(), $invNew->GetDueDate(), $invNew->GetTotalArea(), $invNew->GetGrossVolume(), $invNew->GetAreaFrom(), $invNew->GetAreaTo(), $invNew->GetPriceFrom(), $invNew->GetPriceTo(), $invNew->GetPricem2From(), $invNew->GetPricem2To(), $invNew->GetFloorFrom(), $invNew->GetFloorTo(), $invNew->GetRoomsNoFrom(), $invNew->GetRoomsNoTo(), $invNew->GetCountry(), $invNew->GetProvince(), $invNew->GetDistrict(), $invNew->GetLocation(), $invNew->GetQuarter(), $invNew->GetRegion(), $invNew->GetStreet(), $invNew->GetCategory(), $invNew->GetDepartmentId(), $invNew->GetIdLng(), (int) $invNew->GetId(), (int) $invNew->GetIdLng());
     $result = DataBase::GetDbInstance()->ExecuteQueryWithParams($query, $params);
     self::SaveProperties($invNew, false);
 }