- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
if rest_id<>"" then
if Not Session("login_rest") then
SQL = "UPDATE rest_tbl SET "& sql_1 & sql_2 & sql_3 & sql_4 & sql_5 & sql_6 & " rest_title_sub = '" & rest_title_sub & "', go_search_street_num = '" & go_search_street_num & "', rest_phone_real = '" & rest_phone_real & "', kashrut = '" & kashrut & "', rest_phone = '" & rest_phone & "', rest_line = '" & rest_line & "', rest_delivery_time = '" & rest_delivery_time & "', rest_color = '" & rest_color & "', rest_delivery = " & rest_delivery & ", rest_delivery_min = " & rest_delivery_min & ", go_search_street = '" & go_search_street & "', city = '" & go_search_city & "', area = '" & go_search_area & "', rest_kosher = '" & rest_kosher & "', rest_fax = '" & rest_fax & "', rest_short = '" & rest_short & "', RestDescription='"&RestDescription&"', rest_why = '" & rest_why & "', rest_open_hour = '" & rest_open_hour & "', rest_title = '" & rest_title & "', rest_moretitle = '" & rest_moretitle & "', rest_type ='" & rest_type & "', rest_date = " & date() & ", rest_words = '" & rest_words & "', rest_email = '" & rest_email & "', rest_invoice_email = '" & rest_invoice_email & "', rest_delivery_text = '" & rest_delivery_text & "', rest_zone_in_1 = '" & rest_zone_in_1 & "', rest_zone_in_2 = '" & rest_zone_in_2 & "', rest_zone_in_3 = '" & rest_zone_in_3 & "', rest_zone_in_4 = '" & rest_zone_in_4 & "' , rest_zone_in_33 = '" & rest_zone_in_33 & "', rest_zone_in_44 = '" & rest_zone_in_44 & "', rest_zone_out_1 = '" & rest_zone_out_1 & "', rest_zone_out_2 = '" & rest_zone_out_2 & "' , rest_zone_out_33 = '" & rest_zone_out_33 & "', rest_zone_out_44 = '" & rest_zone_out_44 & "' , rest_zone_out_3 = '" & rest_zone_out_3 & "', rest_zone_out_4 = '" & rest_zone_out_4 & "' , user_password = '" & user_password & "', rest_contact = '" & rest_contact & "', rest_fax_order = '" & rest_fax_order & "', rest_skype = '" & rest_skype & "', rest_sms = '" & rest_sms & "', rest_sms_num = '" & rest_sms_num & "',rest_sms_sendcopy = " & rest_sms_sendcopy & ", rest_com = '" & rest_com & "',rest_invoice_url = '" & rest_invoice_url & "', rest_des_new = '" & rest_des_new & "', text_mini ='"&text_mini&"' , price_visible ="&price_visible&" , min_visible ="&min_visible&", callback ="&callback&", rest_hide_rating ="&rest_hide_rating&", rest_hide_related ="&rest_hide_related&",rest_show_billing='"&rest_show_billing&"', rest_credit_hide ="&credit_hide&", rest_idcard_show ="&idcard_show&",show_cvv = "&show_cvv&",animate_rest_image = " & animate_rest_image & ", HomeLogo ="&HomeLogo&", HomeCupon ="&HomeCupon&", openfield1='"&openfield1&"', openfield2='"&openfield2&"', ForSearch_RestType='"&ForSearch_RestType&"', ForSearch_ShippingCost='"&ForSearch_ShippingCost&"', ForSearch_ShippingTime='"&ForSearch_ShippingTime&"', ForSearch_MinOrder='"&ForSearch_MinOrder&"', Rest_KosherMehadrin="&KosherMehadrin&", CuponsWorth="&CuponsWorth&",delivery_fee_text='" & delivery_fee_text& "',delivery_fee_global = '" & delivery_fee_global & "',aba_menu_rest_id = " & aba_menu_rest_id & ",private_label_id = " & private_label_id & " , " _
& "rest_site_search_link = '" & rest_site_search_link & "'," _
& "rest_title2 = '" & rest_title2 & "'," _
& "private_label_rest_extra_data = '" & private_label_rest_extra_data & "', " _
& "email_msg = '" & email_msg & "'," _
& "text_msg_name1 = '" & text_msg_name1 & "'," _
& "text_msg_phone1 = '" & text_msg_phone1 & "'," _
& "text_msg_position1 = '" & text_msg_position1 & "'," _
& "text_msg_name2 = '" & text_msg_name2 & "'," _
& "text_msg_phone2 = '" & text_msg_phone2 & "'," _
& "text_msg_position2 = '" & text_msg_position2 & "'," _
& "payment_by_delivery_boy = " & payment_by_delivery_boy & "," _
& "rest_discount = " & rest_discount & "," _
& "rest_discount_min = " & rest_discount_min & "," _
& "is_book_food = " & is_book_food & "," _
& "is_frs = " & is_frs & "," _
& "limit_streets_selection = " & limit_streets_selection & "," _
& "is_private_label_close = " & is_private_label_close & "," _
& "sms_user_delivery_boy_left = " & sms_user_delivery_boy_left & "," _
& "is_disable_takeaway = " & is_disable_takeaway & "," _
& "is_disable_delivery = " & is_disable_delivery & "," _
& "company_billing_payment_type = " & company_billing_payment_type & "," _
& "company_billing_comments = '" & company_billing_comments & "'," _
& "takeaway_time = " & takeaway_time & "," _
& "BusinessDishCost="&BusinessDishCost&", AverageCost="&AverageCost&", lang="&lang&" WHERE rest_id = " & rest_id & ";"
Вы не подумайте, сайт относительно новый - этому коду года 3-4 от силы. АСП "классик".
В таблице 162 колонки, из них реально используется наверное не больше половины - что хранится в остальных - тайна покрытая мраком.
DBdev 13.02.2013 15:13 # 0
Обоснование - таблица rest_tbl явно денормализирована. Такую технику обычно применяют для построения DWH. Данные в DWH меняются только через ETL. Если некий ASP solution изменяет данные - это незачёт.
Ну и само конструирование запроса в ASP выглядит коряво.
eth0 13.02.2013 18:16 # +1
DBdev 13.02.2013 18:44 # 0
Разве люди не могут бейсик into ASP?
wvxvw 13.02.2013 19:18 # 0
eth0 13.02.2013 21:29 # +1
wvxvw 13.02.2013 19:20 # 0
DBdev 13.02.2013 19:51 # +2
Чего только люди не придумают, лишь бы базой не заниматься.