I'm just starting to learn CF, and i have this project : send out email to each student with information on each of the class they are taking, each student can and will have more than 1 class.
so far here's what i have:
<cfquery name="email_list" datasource="webcf">
select email, name
from email_list
</cfquery>
<cfloop query="email_list">
<cfquery name="class_info" datasource="webcf">
select distinct a.email, a.class, b.time, b.location
from email_list a, class_info b
where a.email_address = '#email_address#'
</cfquery>
<!C-- <cfmail
to="#email_list.email#"
from="Register Office"
subject="student and class info"
server="#smtp_server#">
Class: #class_info.class#
Time: #class_info.time#
Location: #class_info.location#
</cfmail>
</cfloop>
i ran a test for this one, it only sends 1 class info. while the student has 4 class registered. I would like to have on email info. of all 4 class:
Class: MATH101
time: TR
location: JC101
Class: ENG101
time: MWF
location: ST300
...
and so on.
PLEASE HELP!!!
so far here's what i have:
<cfquery name="email_list" datasource="webcf">
select email, name
from email_list
</cfquery>
<cfloop query="email_list">
<cfquery name="class_info" datasource="webcf">
select distinct a.email, a.class, b.time, b.location
from email_list a, class_info b
where a.email_address = '#email_address#'
</cfquery>
<!C-- <cfmail
to="#email_list.email#"
from="Register Office"
subject="student and class info"
server="#smtp_server#">
Class: #class_info.class#
Time: #class_info.time#
Location: #class_info.location#
</cfmail>
</cfloop>
i ran a test for this one, it only sends 1 class info. while the student has 4 class registered. I would like to have on email info. of all 4 class:
Class: MATH101
time: TR
location: JC101
Class: ENG101
time: MWF
location: ST300
...
and so on.
PLEASE HELP!!!