MySQL query problem Hi, Hope someone can help, I have been trying to get the following update query to work as shown below. The error is as follows.. Thanks in advance for any help.
[MySQL][ODBC 3.51 Driver][mysqld-5.0.24a-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' pro_image = '', pro_live = 1, pro_specialoffer = 0, pro_imagetext = '', pro_sec' at line 1
All the strings have quotes around them, below is the code.
Query = "UPDATE Products SET " & _
" pro_name = '" & request("title") & "'" & _
", pro_price = " & request("price") & _
", pro_description = '" & request("description") & "'" & _
", pro_soldout = " & status_soldout & _
", pro_flag = '" & request("flag") & "'" & _
", pro_manufacturer = " & request("manufacturer") & _
", pro_specialPrice = " & request("specialprice") & _
", pro_image = '" & request("image") & "'" & _
", pro_live = " & status & _
", pro_specialoffer = " & status_special & _
", pro_imagetext = '" & request("imagetext") & "'" & _
", pro_section = " & request("section") & _
", pro_keywords = '" & request("keywords") & "'" & _
", pro_testreport = '" & request("testreport") & "'" & _
", pro_link = '" & request("link") & "'" & _
", pro_pdf = '" & request("pdf") & "'" & _
", pro_reference = '" & request("product_ref") & "'" & _
", pro_priceBand = " & status_priceband & _
", pro_extra = " & extra & _
", pro_ip = '" & Request.ServerVariables("REMOTE_ADDR") & "'" & _
", pro_lastmodified = now()" & _
", pro_modifiedby = '" & session("username") & "'" & _
", pro_sp = '" & request("sp") & "'" & _
", pro_xmas = " & status_xmas & _
", pro_xmasorder = '" & request("xmas_order") & "'" & _
" WHERE pro_id =" & request("id")
set dog=db.execute(Query) |