scusa ma sei sicuro che lo "USERID" debba essere UPDATO? non è che va nella condizione di WHERE?
ovvero devi aggiornare stato=true per l'utente che hai id=userID e X=aa e Y=bb?
se così fosse la query andrebbe riscritta così:
codice:dim X(9),Y(9) for i=0 to 8 X(i)=request.form("X" & (i+1) ) Y(i)=request.form("Y" & (i+1) ) next dim vuoto: vuoto=0 sql = "UPDATE layout set stato='true' WHERE UserID='"&ID&"' and (" for i = 0 to ubound(X) if len(trim(X(i)))>0 then if vuoto>0 then sql=sql & " or" sql = sql & " (X=" & X(i) & " AND Y=" & Y(i) & ")" vuoto=vuoto+1 end if next sql=sql & ")"

Rispondi quotando