Simple ASP MYSQL question
am 30.04.2007 16:56:31 von lawrence.huntHey
I have successfully been able to read from a MYSQL database using
this:
set rs = conn.Execute("SELECT Password FROM UserTable WHERE Username =
'" & entuser & "' AND Password = '" & entpass & "'")
Do while not rs.eof ' Do until it reaches end of db
actualpass = rs("Password")
rs.MoveNext ' Next record
loop
But I now want to be able to add new records to tables, I used this
code, but it does not seem to be able to work, any ideas?
set rs = conn.Execute("INSERT INTO UserTable SET Username = '" &
username & "' AND Password = '" & username & "' AND FirstName = '" &
username & "' AND LastName = '" & username & "' AND Email = '" &
username & "' AND confirm = 0 AND confstring = '" & passconf & "'")