This not really a complex problem, but I just need to exhibit a few things before you can know what I need to do. Right now I have a template that looks like this:
+++++++++++++++++++++++++++++
<!--Check for password in URL -->
<cfif IsDefined("Password"
>
<!--Authorization check -->
<cfif isDefined("Session.Auth"
is NOT TRUE>
<cflocation url="login.cfm">
<cfelse>
<!--Run query to get user information -->
<cfquery datasource="LHS" name="getUser">
SELECT * FROM Users WHERE (UserName = '#URL.UserName#' AND Password = '#URL.Password#')
</cfquery>
<!--Run query to get user's classes -->
<cfoutput>
<cfquery datasource="LHS" name="getClasses">
SELECT Assignments.ID AS AssignmentID,* FROM Assignments,Classes WHERE (#getUser.ID# = Classes.Teacher) AND (Assignments.Class = Classes.ID)
</cfquery>
</cfoutput> I am <cfoutput query="getUser">#RealName#</cfoutput>
and here are my current assignments. Click any class to add an assignment to it.<cfoutput query="getClasses">
<ul>
<li><b><a href="assignment.cfm?Class=#getClasses.ID#&Teacher=#getUser.ID#&UserName=#URL.UserName#&Password=#URL.Password#">#ClassName#</a></b><i>
#getClasses.AssignmentTitle#</i>
<a href="assignment.cfm?Class=#getClasses.ID#&Teacher=#getUser.ID#&AssignmentID=#getClasses.AssignmentID#&UserName=#URL.UserName#&Password=#URL.Password#">Edit</a></li>
</ul>
</cfoutput>
</cfif>
<cfelse>
<cflocation url="login.cfm">
</cfif>
+++++++++++++++++++++++++++++
This generates something like this:
+++++++++++++++++++++++++++++
I am Mr. Bernhardt and here are my current assignments. Click any class to add an assignment to it.
Computer Applications 1 Essay on ColdFusion
Computer Applications 2 Welcome!
Computer Applications 3 Welcome!
Computer Applications 1 as
Computer Applications 1 test
Computer Applications 1 09-09-99
Computer Applications 1 09-09-8898
+++++++++++++++++++++++++++++
Essentially, this lists every assignment and the class that it was made under. However, I would like to know how to have it list each assignment under the headings of each class name, for example, it would look like this:
+++++++++++++++++++++++++++++
I am Mr. Bernhardt and here are my current assignments. Click any class to add an assignment to it.
Computer Applications 1
[ul][li]Essay on ColdFusion Edit[/li]
[li]as[/li]
[li]test[/li]
[li]09-09-99[/li]
[li]09-09-8898[/li][/ul]
Computer Applications 2
Etc....
+++++++++++++++++++++++++++++
I tried using GROUP in my CFOUTPUT tag, but it didn't work. Does any one know how to help me? Thanks in advance!
Ryan ;-]
+++++++++++++++++++++++++++++
<!--Check for password in URL -->
<cfif IsDefined("Password"
<!--Authorization check -->
<cfif isDefined("Session.Auth"
<cflocation url="login.cfm">
<cfelse>
<!--Run query to get user information -->
<cfquery datasource="LHS" name="getUser">
SELECT * FROM Users WHERE (UserName = '#URL.UserName#' AND Password = '#URL.Password#')
</cfquery>
<!--Run query to get user's classes -->
<cfoutput>
<cfquery datasource="LHS" name="getClasses">
SELECT Assignments.ID AS AssignmentID,* FROM Assignments,Classes WHERE (#getUser.ID# = Classes.Teacher) AND (Assignments.Class = Classes.ID)
</cfquery>
</cfoutput> I am <cfoutput query="getUser">#RealName#</cfoutput>
and here are my current assignments. Click any class to add an assignment to it.<cfoutput query="getClasses">
<ul>
<li><b><a href="assignment.cfm?Class=#getClasses.ID#&Teacher=#getUser.ID#&UserName=#URL.UserName#&Password=#URL.Password#">#ClassName#</a></b><i>
#getClasses.AssignmentTitle#</i>
<a href="assignment.cfm?Class=#getClasses.ID#&Teacher=#getUser.ID#&AssignmentID=#getClasses.AssignmentID#&UserName=#URL.UserName#&Password=#URL.Password#">Edit</a></li>
</ul>
</cfoutput>
</cfif>
<cfelse>
<cflocation url="login.cfm">
</cfif>
+++++++++++++++++++++++++++++
This generates something like this:
+++++++++++++++++++++++++++++
I am Mr. Bernhardt and here are my current assignments. Click any class to add an assignment to it.
Computer Applications 1 Essay on ColdFusion
Computer Applications 2 Welcome!
Computer Applications 3 Welcome!
Computer Applications 1 as
Computer Applications 1 test
Computer Applications 1 09-09-99
Computer Applications 1 09-09-8898
+++++++++++++++++++++++++++++
Essentially, this lists every assignment and the class that it was made under. However, I would like to know how to have it list each assignment under the headings of each class name, for example, it would look like this:
+++++++++++++++++++++++++++++
I am Mr. Bernhardt and here are my current assignments. Click any class to add an assignment to it.
Computer Applications 1
[ul][li]Essay on ColdFusion Edit[/li]
[li]as[/li]
[li]test[/li]
[li]09-09-99[/li]
[li]09-09-8898[/li][/ul]
Computer Applications 2
Etc....
+++++++++++++++++++++++++++++
I tried using GROUP in my CFOUTPUT tag, but it didn't work. Does any one know how to help me? Thanks in advance!
Ryan ;-]