I wish I could.  The problem is that its part of a report that list all the
questions in a table.  For each question is get all the students that had
submitted and work out correct answer percentages. Then when its done that
the client want it to get all the students and work out all the questions
each student to give each student a percentage.  So the page has to work out
both way, and I don't want to do a second lot of queries with student first.


I tried 

<cfset variable.student_#evalate('#students.autonumber#')# = whatever> but I
don't thing you can use functions on the left side of an equation.

Brian  

-----Original Message-----
From: Phil Evans [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 27 August 2003 3:18 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: Variable Problems


Can you restructure the query so that it returns

Student1
Question 1
Question 3
Student2
Question 1
Question 2
Question 3

etc.

Would be much easier to work with.

or even:

Question 1Student 1
Question 1Student 2
Question 1Student 3
Question 2Student 2
Question 2Student 3
Question 2Student 4
Question 3Student 1
Question 3Student 2

You could then sort by student, and counting questions becomes easy.
Phil.


----- Original Message ----- 
From: "Knott, Brian" <[EMAIL PROTECTED]>
To: "CFAussie Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, August 27, 2003 3:09 PM
Subject: [cfaussie] Variable Problems


> I have a problem setting variables.
>
> I have a loop of questions that contain a loop of questions.  So the loops
> look like this.
>
> Question 1
> Student 1
> Student 2
> Student 3
> Question 2
> Student 2
> Student 3
> Student 4
> Question 3
> Student 1
> Student 2
>
> What I want to be able do is add up the number of questions has done.  So
in
> the above example student 1 would be 2, student 2 would be 3.  So I'm
trying
> to set some kind of counter inside the question loop every time a student
is
> found.
>
>  My problem is that inside the loop I can say
>
> <cfset variables.studentXXX = student XXX + 1>
>
> The student number could be anything.
>
> So in summary just after a way to add up the number of questions a student
> has answered.
>
> Brian Knott
>
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
[EMAIL PROTECTED]
>
> MX Downunder AsiaPac DevCon - http://mxdu.com/
>


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to