I have a loop that will insert user course selections. I also want to keep a running sum of the costs for these courses. The course fee is stored in tblCourse.course_fee
which is then multiplied by number of people attending the course, which the users enters a value(no_attending). I keep getting an error message
The error message is:
The name 'course_fee' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
Thanks for your help.
which is then multiplied by number of people attending the course, which the users enters a value(no_attending). I keep getting an error message
Code:
<cfquery name="getFee" datasource="seligins">
SELECT course_fee
FROM tblCourse
WHERE course_id = '#Form.course_id#'
</cfquery>
<!--- Insert fees details --->
<cfset thisList = "#Form.course_id#">
<cfloop list = "#thisList#" index="nthisList">
<cfquery name="insertFee" datasource="seligins">
INSERT INTO tblAttendee_registration
(subtotal)
VALUES
(getFee.course_fee * #Form.no_attending#)
</cfquery>
</cfloop>
The error message is:
The name 'course_fee' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
Thanks for your help.