Hello,
I am not sure how to approach this one.
I have two tables, ansers and questions.
The user has to log in, at log in I check if the user has any answers by doing a count if the count is zero then I redirect the user to an autosubmit page that populates the questions, then the user can log in and answer each question. If the user already has some questions populated then I redirect the user to be able to edit each question.
Up to this point I am ok all works well.
Where I am stuck is when the admin adds more questions, not sure how to add those to each user.
My ansers table has itm, userid, and about 5 answer fields.
My questions table has itm, and an X number of questions.
I was trying to do this
and I get no results
in the questions table I have 7 records in the itm field
in the answers table I have 6 records in the itm field
the records are the itm id
1,2,3,4, etc
any help as always is welcome and appreciated!!
I am not sure how to approach this one.
I have two tables, ansers and questions.
The user has to log in, at log in I check if the user has any answers by doing a count if the count is zero then I redirect the user to an autosubmit page that populates the questions, then the user can log in and answer each question. If the user already has some questions populated then I redirect the user to be able to edit each question.
Up to this point I am ok all works well.
Where I am stuck is when the admin adds more questions, not sure how to add those to each user.
My ansers table has itm, userid, and about 5 answer fields.
My questions table has itm, and an X number of questions.
I was trying to do this
Code:
Dim objconn,objRS,strSQL
Set objconn = Server.CreateObject("ADODB.Connection")
objconn.ConnectionString = "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("qa.mdb")
objconn.Open
Set objRs = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM questions right JOIN answers ON (answers.itm = questions.itm) WHERE (((username)is null));"
objRS.Open strSQL, objconn
Do While Not objRS.EOF
Response.Write objRs("questions.itm") & " " & objRs("answers.username") & "<br>"
objRS.MoveNext
Loop
objRs.Close
objconn.Close
and I get no results
in the questions table I have 7 records in the itm field
in the answers table I have 6 records in the itm field
the records are the itm id
1,2,3,4, etc
any help as always is welcome and appreciated!!