I add rows to mysql DB using and try to grab ID straight back out (ID is an auto increment, don`t try to add it in code below) however the id is coming out blank on the page. The item is entered into the DB no probs and creating the unique id.
Does anyone know where |I am going wrong to get the ID straight back out?
Thanks
Code:
SQL = "SELECT * FROM delreg"
set rs = server.CreateObject("ADODB.RECORDSET")
rs.open SQL,objConn, 3,3
rs.AddNew
rs("item1") = request.form("item2")
etc etc etc
bid = rs("id")
rs.close
response.write bid
Does anyone know where |I am going wrong to get the ID straight back out?
Thanks