When I want to insert the database I'm getting errors.....
I was trying something like this but of course it doesn't work
because name of the field is a dynamically generated number (QuestionID)
<CFQUERY DATASOURCE="#DS#" NAME="insert">
Insert INTO tblEnquete
(
QuestionID,
AnswerID
)
VALUES
(
#QuestionID#,
#AnswerID#
)
</CFQUERY>
Someone knows? Thanks a lot in advance!! ! ! !
test page is: http://62.131.141.237/enquete
You could try to debug your query to actually see what the values are that are being inserted in the database.
and the column name in the db is QuestionID. So I should have
something like: insert VALUE #QuestionID# .... but the name of the field is 34 or 22 .... and not #QuestionID#.....
but I don't know the name of the field.... because it is every time different.....
I assume that after the post, you don't know what the names of the formfields are that you have submitted?
In that case:
Use the #FORM.FIELDNAMES# collection in the page you post your form-data to, in order to get the names of the fields you have actually submitted.