1 Reply Latest reply on Mar 1, 2009 8:06 PM by Dan Bracuk

    cfloop query and last row

    funandlearning333 Level 1
      Hello everyone,

      I was trying looping over a query which has to be executed only when the last row of a previous loop has been reached. The question is: I have nested loops, I am able to print the values based on two loops:

      for example: <cfloop query="advisor">
      <cfloop students>
      I am able to get student values for a particular advisor and print the values for different advisor and students. I am trying to include another loop like grades within advisor loop which should be executed at the end of students list for that particular advisor. What I am doingg right now is displaying the values in a table format.


      How is possible to know when I would reach the end of the student loop for an advisor and then loop the grades for the same advisor before proceeding to another advisor?

      Any suggestions would be great.