Пример #1
0
 /**
  * Save given offer object (ofeNew) to database.
  * @param Offer $ofeNew
  */
 public static function EditOffer(Offer $ofeNew)
 {
     $query = "UPDATE #S#offers SET object=?, rent=?, symbol=?, original=?, province=?, district=?, location=?, quarter=?, region=?, street=?, floor=?, price=?, price_square=?, rooms_no=?, \r\n            area=?, latitude=?, longitude=?, building_technology=?, construction_material=?, construction_status=?, building_type=?, agents_id=?, creation_date=?, modification_date=?, status=?, \r\n            description_synonim=?, country=?, floor_no=?, year_of_construction=?, house_type=?, first_page=?, object_type=?, contract_type=?, visits_no=?, legal_status=?, ownership_status=?, furnishings=?,\r\n            field_area=?, change_status=?, notices=?, notices_property=?, video_link=?, no_commission=?, expiration_date=?, has_swfs=?, has_movs=?, has_photos=?, has_pans=?, has_maps=?, has_proj=?,\r\n            loc_as_commune=? WHERE id=? AND id_lng=?;";
     $params = array($ofeNew->GetObject(), $ofeNew->GetRent(), $ofeNew->GetSymbol(), $ofeNew->GetOriginal(), $ofeNew->GetProvince(), $ofeNew->GetDistrict(), $ofeNew->GetLocation(), $ofeNew->GetQuarter(), $ofeNew->GetRegion(), $ofeNew->GetStreet(), $ofeNew->GetFloor(), $ofeNew->GetPrice(), $ofeNew->GetPriceSquare(), $ofeNew->GetRoomsNo(), $ofeNew->GetArea(), $ofeNew->GetLatitude(), $ofeNew->GetLongitude(), $ofeNew->GetBuildingTechnology(), $ofeNew->GetConstructionMaterial(), $ofeNew->GetConstructionStatus(), $ofeNew->GetBuildingType(), $ofeNew->GetAgentId(), $ofeNew->GetCreationDate(), $ofeNew->GetModificationDate(), $ofeNew->GetStatus(), $ofeNew->GetDescriptionSynonim(), $ofeNew->GetKraj(), $ofeNew->GetIloscPieter(), $ofeNew->GetRokBudowy(), $ofeNew->GetRodzajDomu(), $ofeNew->GetPierwszaStrona(), $ofeNew->GetRodzajObiektu(), $ofeNew->GetSposobPrzyjecia(), $ofeNew->GetIloscOdslonWWW(), $ofeNew->GetStanPrawny(), $ofeNew->GetStatusWlasnosci(), $ofeNew->GetUmeblowanieLista(), $ofeNew->GetPowierzchniaDzialki(), $ofeNew->GetZamiana(), $ofeNew->GetUwagiOpis(), $ofeNew->GetUwagiNieruchomosc(), $ofeNew->GetVideoLink(), $ofeNew->GetNoCommission(), $ofeNew->GetExpirationDate(), $ofeNew->GetHasSwfs(), $ofeNew->GetHasMovs(), $ofeNew->GetHasPhotos(), $ofeNew->GetHasPans(), $ofeNew->GetHasMaps(), $ofeNew->GetHasProj(), $ofeNew->GetLocAsCommune(), (int) $ofeNew->GetId(), (int) $ofeNew->GetIdLng());
     $result = DataBase::GetDbInstance()->ExecuteQueryWithParams($query, $params);
     self::SaveProperties($ofeNew, false);
 }