snowboardr
Programmer
Can I not use "IN" when im inserting? If not how can insert records with checkbox values like : 1, 3, 4, etc
------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[MySQL][ODBC 3.51 Driver][mysqld-3.23.51-max-debug]You have an error in your SQL syntax near 'WHERE userID IN (1)' at line 1
----------------------------------------
www.vzio.com
ASP WEB DEVELOPMENT
------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[MySQL][ODBC 3.51 Driver][mysqld-3.23.51-max-debug]You have an error in your SQL syntax near 'WHERE userID IN (1)' at line 1
----------------------------------------
Code:
If Request.Form("save") = "true" AND Request.Form("payed") <> "" then
'# Create Connection & Recordset
Set conn = createobject("ADODB.Connection")
set supdate = Server.CreateObject("ADODB.RecordSet")
'# Run open connection function
Database("open")
'# Make sql statement
SQLupdate = "INSERT INTO users (uPayed) VALUES ('" & "y" & "') WHERE userID IN (" & Request.Form("payed") & ")"
set supdate = conn.Execute(SQLupdate)
Database("close")
End If
ASP WEB DEVELOPMENT