imjusthere
asked on
sql noob question
Can someone tell me what I've done wrong here? There is something wrong with my where clause. If i write the value in idnumber manually everything works fine. But when i try to assign it as a variable it won't work.
<%
sql ="UPDATE bc SET bc_approved = 1, bc_name='"&name&"', bc_title='"&title&"', bc_address1='"&address&"', bc_address2='"&address2&"' , bc_cell='"&direct&"',bc_ph one2='"&to llfree&"', bc_phone=' "&office&" ',bc_fax=' "&fax&"',b c_license= '"&lic&"', bc_email=' "&email&"' ,bc_spanis h='"&spani sh&"',bc_q uantity='" &quantity& "',bc_back er='"&back er&"' WHERE bc_id = '"&idnumber&"'"
%>
<%
sql ="UPDATE bc SET bc_approved = 1, bc_name='"&name&"', bc_title='"&title&"', bc_address1='"&address&"',
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
probably should make sure the value is actually populated by something...
response.write(idnumber)
while you're at it, you could also convert it to an integer
cint(idnumber)