Without reading thru all that (I'm lazy) I did notice that you are using
'id' from various scopes for different things -- classes, students, etc. Is
it possible that you are confusing two or more?
A more likely scenario:
You are comparing a startdate with now(). If you have startdate as today
(but at midnight, which is the default in most DBs if you don't set a time)
then this will fail. Midnight this morning is less than now() not equal to
it.
-- Ben Doom
Programmer & General Lackey
Moonbow Software, Inc
: -----Original Message-----
: From: Jillian Carroll [mailto:[EMAIL PROTECTED]]
: Sent: Wednesday, February 12, 2003 9:48 AM
: To: CF-Talk
: Subject: Not all Records Being Returned
:
:
: Hey everybody... I'm having a problem that is causing me to knock my
: head against the wall... I'm sure it's something completely obvious. I
: have the following code (pasted below) and it should return 3
: users/rows... but it only returns 1. There isn't any error message, it
: just lists one. I did confirm in my DB that there are 3 users who are
: assigned to this course.
:
:
:
: Any suggestions would be most appreciated. I'm not sure it helps, by my
: environment is: RH 7.2/CF 5/Postgres 7.2.
:
:
:
: Thank you!
:
:
:
: --
:
: Jillian
:
:
:
: <!--- QUERIES AND VARIABLE SETTING --->
:
: <cfset today = DateFormat(now(),"mm/dd/yyyy")>
:
:
:
: <cfquery name="permissions" datasource="#DSN#">
:
: SELECT id, centraladmin, provadmin, trainer FROM users WHERE id =
: #client.id#
:
: </cfquery>
:
:
:
: <cfquery name="courses" datasource="#DSN#">
:
: SELECT * from courses WHERE id = #url.id#
:
: </cfquery>
:
:
:
: <cfquery name="attendeeupdate" datasource="#DSN#">
:
: SELECT * from attendee WHERE assigneddate = #url.id#
:
: </cfquery>
:
:
:
: <cfquery name="userinfo" datasource="#DSN#">
:
: SELECT * FROM users WHERE id = #attendeeupdate.users_id# ORDER BY lname,
: fname ASC
:
: </cfquery>
:
:
:
: <cfquery name="salutation" datasource="#DSN#">
:
: SELECT * FROM salutation ORDER by salutation ASC
:
: </cfquery>
:
:
:
: <cfquery name="province" datasource="#DSN#">
:
: SELECT * FROM prov ORDER by abbreviation ASC
:
: </cfquery>
:
:
:
: <cfquery name="country" datasource="#DSN#">
:
: SELECT * FROM country ORDER by name ASC
:
: </cfquery>
:
:
:
: <cfquery name="profession" datasource="#DSN#">
:
: SELECT * FROM profession
:
: </cfquery>
:
:
:
: <cfquery name="designation" datasource="#DSN#">
:
: SELECT * FROM designation
:
: </cfquery>
:
:
:
: <cfquery name="yearsprac" datasource="#DSN#">
:
: SELECT * FROM years
:
: </cfquery>
:
:
:
: <cfquery name="empstatus" datasource="#DSN#">
:
: SELECT * FROM empstatus
:
: </cfquery>
:
:
:
: <cfquery name="empplace" datasource="#DSN#">
:
: SELECT * FROM empplace
:
: </cfquery>
:
:
:
: <cfquery name="empresp" datasource="#DSN#">
:
: SELECT * FROM empresp
:
: </cfquery>
:
:
:
: <cfquery name="dpccat" datasource="#DSN#">
:
: SELECT * FROM dpccat
:
: </cfquery>
:
:
:
: <cfquery name="dpcclass" datasource="#DSN#">
:
: SELECT * FROM dpcclass
:
: </cfquery>
:
:
:
: <cfquery name="caeyear" datasource="#DSN#">
:
: select * FROM caeyear ORDER BY year DESC
:
: </cfquery>
:
:
:
: <cfquery name="payment" datasource="#DSN#">
:
: SELECT * FROM payment ORDER BY type ASC
:
: </cfquery>
:
:
:
: <cfquery name="postassign" datasource="#DSN#">
:
: SELECT * FROM postassign
:
: </cfquery>
:
:
:
: <cfquery name="courses" datasource="#DSN#">
:
: SELECT id, type, other, city, prov, s1_startdate
:
: FROM courses
:
: WHERE s1_startdate >= #Now()#
:
: ORDER BY s1_startdate DESC
:
: </cfquery>
:
: <!--- END QUERIES AND VARIABLE SETTING --->
:
:
:
: <!--- SET DEFAULT VALUES FOR CHECKBOX/RADIO BUTTONS --->
:
: <CFPARAM NAME="FORM.attended" default="0">
:
: <CFPARAM NAME="FORM.withdrawn" default="0">
:
: <CFPARAM NAME="FORM.paymentcleared" default="0">
:
: <CFPARAM NAME="FORM.assignrec1" default="0">
:
: <CFPARAM NAME="FORM.assignrec2" default="0">
:
: <CFPARAM NAME="FORM.assignrec3" default="0">
:
: <CFPARAM NAME="FORM.pretest" default="0">
:
: <CFPARAM NAME="FORM.skilltest1" default="0">
:
: <CFPARAM NAME="FORM.skilltest2" default="0">
:
: <CFPARAM NAME="FORM.skilltest3" default="0">
:
:
:
: <cfif attendeeupdate.assignrec1 EQ 1><CFSET
: checked4="Yes"><CFELSE><CFSET checked4="No"></CFIF>
:
: <cfif attendeeupdate.assignrec2 EQ 1><CFSET
: checked5="Yes"><CFELSE><CFSET checked5="No"></CFIF>
:
: <cfif attendeeupdate.assignrec3 EQ 1><CFSET
: checked6="Yes"><CFELSE><CFSET checked6="No"></CFIF>
:
: <cfif attendeeupdate.pretest EQ 1><CFSET checked7="Yes"><CFELSE><CFSET
: checked7="No"></CFIF>
:
: <cfif attendeeupdate.skilltest1 EQ 1><CFSET
: checked8="Yes"><CFELSE><CFSET checked8="No"></CFIF>
:
: <cfif attendeeupdate.skilltest2 EQ 1><CFSET
: checked9="Yes"><CFELSE><CFSET checked9="No"></CFIF>
:
: <cfif attendeeupdate.skilltest3 EQ 1><CFSET
: checked10="Yes"><CFELSE><CFSET checked10="No"></CFIF>
:
: <!--- END SET DEFAULT VALUES FOR CHECKBOX/RADIO BUTTONS --->
:
:
:
: <cfinclude template="headerinc.cfm" />
:
:
:
: <br />
:
:
:
: <table border="0" cellpadding="0" cellspacing="0" width="100%">
:
: <tr>
:
: <td colspan="2">
:
: <table border="0" cellpadding="2" cellspacing="0"
: width="100%" class="tableborder">
:
: <tr>
:
: <td class="tabletitle">COURSE ATTENDEE GRADING
: (Please scroll to the right to see entire record for each user.)</td>
:
: <td class="tabletitle"
: align="right"><cfoutput><a href="user_form.cfm?id=#client.id#"
: class="tabletitlesm">[Modify My Personal Information]</a></cfoutput> <a
: href="main.cfm" class="tabletitlesm">[Home]</a></td>
:
: </tr>
:
: <tr>
:
: <td class="tabletitlegrey" colspan="2">The
: following attendees are assigned to: <cfoutput>#courses.city#,
: #courses.prov# - #courses.s1_startdate#</cfoutput></td>
:
: </tr>
:
: </table>
:
: </td>
:
: </tr>
:
: <tr height="1"><td colspan"2"></td></tr>
:
: <tr>
:
: <td colspan="2">
:
: <table border="1" cellpadding="0" cellspacing="0"
: width="100%">
:
: <tr>
:
: <td>Attendee Name</td>
:
: <td>Registration Received:</td>
:
: <td>Confirmation Sent:</td>
:
: <td>Attended:</td>
:
: <td>Withdrawn:</td>
:
: <td>Payment Method:</td>
:
: <td>Payment Cleared:</td>
:
: <td>Authorization Number:</td>
:
: <td>Pre-Workshop Package Sent:</td>
:
: <td>Received Pre-Assignments:</td>
:
: <td>Post Workship Written Tests:</td>
:
: <td>Post Workshop Skills Tests:</td>
:
: <td>Post Workshop Assignment:</td>
:
: <td>Requirements Not Met Notice Sent:</td>
:
: <td>AsthmaTrec Certificate Date:</td>
:
: <td>Income Tax Receipt Sent:</td>
:
: <td>Assessment Strategies Notified:</td>
:
: <td>CEU Notice Sent:</td>
:
: <td>CAE Exam Date:</td>
:
: <td>CAE Status Gained Date:</td>
:
: <td>Year Recertification Due:</td>
:
: <td>Last Year Recertification Received:</td>
:
: <td valign="top">Admin Note:</td>
:
: <td>Action</td>
:
: </tr>
:
: <cfoutput query="userinfo">
:
: <cfform name="grading" action="grading.cfm?id=#courses.id#"
: method="post">
:
: <tr>
:
: <td>#userinfo.lname#, #userinfo.fname#</td>
:
: <td><cfinput type="text" name="regreceived"
: size="10" class="text" value="#attendeeupdate.regreceived#" /> <a
: href="javascript:ShowCalendar('user', 'regreceived')"><img
: src="images/cal.gif" width="16" height="16" border="0" alt="Click Here
: to Pick up the date"></a></td>
:
: <td><cfinput type="text" name="confsent"
: size="10" class="text" value="#attendeeupdate.confsent#" /> <a
: href="javascript:ShowCalendar('user', 'confsent')"><img
: src="images/cal.gif" width="16" height="16" border="0" alt="Click Here
: to Pick up the date"></a></td>
:
: <td><input type="radio" name="attended"
: value="Yes" <cfif attendeeupdate.attended IS 'yes'>checked</cfif>> Yes
: <input type="radio" name="attended" value="No" <cfif
: attendeeupdate.attended IS 'no'>checked</cfif>> No</td>
:
: <td><input type="radio" name="withdrawn"
: value="Yes" <cfif attendeeupdate.withdrawn IS 'yes'>checked</cfif>> Yes
: <input type="radio" name="withdrawn" value="No" <cfif
: attendeeupdate.withdrawn IS 'no'>checked</cfif>> No</td>
:
: <td><select name="paymentmethod"><cfloop
: query="payment"><option <cfif attendeeupdate.paymentmethod eq
: payment.type>selected</cfif>>#payment.type#</option></cfloop></select></
: td>
:
: <td><input type="radio" name="paymentcleared"
: value="Yes" <cfif attendeeupdate.paymentcleared IS 'yes'>checked</cfif>>
: Yes <input type="radio" name="paymentcleared" value="No" <cfif
: attendeeupdate.paymentcleared IS 'no'>checked</cfif>> No</td>
:
: <td><cfinput type="text" name="authnum"
: value="#attendeeupdate.authnum#" size="25" class="text" required="no"
: /></td>
:
: <td><cfinput type="text" name="pkgsentdate"
: size="10" class="text" value="#attendeeupdate.pkgsentdate#" /> <a
: href="javascript:ShowCalendar('user', 'pkgsentdate')"><img
: src="images/cal.gif" width="16" height="16" border="0" alt="Click Here
: to Pick up the date"></a></td>
:
: <td><cfinput type="checkbox" value="1"
: name="assignrec1" checked="#checked4#" /> 1 <cfinput type="checkbox"
: value="1" name="assignrec2" checked="#checked5#" /> 2 <cfinput
: type="checkbox" value="1" name="assignrec3" checked="#checked6#" /> 3
: <cfinput type="checkbox" value="1" name="pretest" checked="#checked7#"
: /> Pre-Test</td>
:
: <td><cfinput type="text" name="writtentest1"
: value="#attendeeupdate.writtentest1#" size="3" class="text"
: required="no" />% 1 <cfinput type="text" name="writtentest2"
: value="#attendeeupdate.writtentest2#" size="3" class="text"
: required="no" />% 2 <cfinput type="text" name="writtentest3"
: value="#attendeeupdate.writtentest3#" size="3" class="text"
: required="no" />% 3</td>
:
: <td><cfinput type="checkbox" value="1"
: name="skilltest1" checked="#checked8#" /> 1 <cfinput type="checkbox"
: value="1" name="skilltest2" checked="#checked9#" /> 2 <cfinput
: type="checkbox" value="1" name="skilltest3" checked="#checked10#" />
: 3</td>
:
: <td><select name="postassign"><cfloop
: query="postassign"><option <cfif attendeeupdate.postassign eq
: postassign.status>selected</cfif>>#postassign.status#</option></cfloop><
: /select></td>
:
: <td><cfinput type="text" name="reqdate"
: value="#attendeeupdate.reqdate#" size="25" class="text" required="no"
: /> <a href="javascript:ShowCalendar('user', 'reqdate')"><img
: src="images/cal.gif" width="16" height="16" border="0" alt="Click Here
: to Pick up the date"></a></td>
:
: <td><cfinput type="text" name="asthmacertdate"
: value="#attendeeupdate.asthmacertdate#" size="10" class="text" > <a
: href="javascript:ShowCalendar('user', 'asthmacertdate')"><img
: src="images/cal.gif" width="16" height="16" border="0" alt="Click Here
: to Pick up the date"></a></td>
:
: <td><cfinput type="text" name="taxdate"
: value="#attendeeupdate.taxdate#" size="10" class="text" /> <a
: href="javascript:ShowCalendar('user', 'taxdate')"><img
: src="images/cal.gif" width="16" height="16" border="0" alt="Click Here
: to Pick up the date"></a></td>
:
: <td><cfinput type="text" name="assstratdate"
: value="#attendeeupdate.assstratdate#" size="10" class="text" /> <a
: href="javascript:ShowCalendar('user', 'assstratdate')"><img
: src="images/cal.gif" width="16" height="16" border="0" alt="Click Here
: to Pick up the date"></a></td>
:
: <td><cfinput type="text" name="ceudate"
: value="#attendeeupdate.ceudate#" size="10" class="text" /> <a
: href="javascript:ShowCalendar('user', 'ceudate')"><img
: src="images/cal.gif" width="16" height="16" border="0" alt="Click Here
: to Pick up the date"></a></td>
:
: <td><cfinput type="text" name="caeexamdate"
: value="#attendeeupdate.caeexamdate#" size="10" class="text" /> <a
: href="javascript:ShowCalendar('user', 'caeexamdate')"><img
: src="images/cal.gif" width="16" height="16" border="0" alt="Click Here
: to Pick up the date"></a></td>
:
: <td><cfinput type="text"
: name="caestatusgaindate" value="#attendeeupdate.caestatusgaindate#"
: size="10" class="text" /> <a href="javascript:ShowCalendar('user',
: 'caestatusgaindate')"><img src="images/cal.gif" width="16" height="16"
: border="0" alt="Click Here to Pick up the date"></a></td>
:
: <td><cfinput type="text" name="recertdate"
: value="#attendeeupdate.recertdate#" size="10" class="text" /> <a
: href="javascript:ShowCalendar('user', 'recertdate')"><img
: src="images/cal.gif" width="16" height="16" border="0" alt="Click Here
: to Pick up the date"></a></td>
:
: <td><cfinput type="text" name="recertrecdate"
: value="#attendeeupdate.recertrecdate#" size="10" class="text" /> <a
: href="javascript:ShowCalendar('user', 'recertrecdate')"><img
: src="images/cal.gif" width="16" height="16" border="0" alt="Click Here
: to Pick up the date"></a></td>
:
: <td><textarea name="adminNote" cols="20"
: rows="2" class="text"
: required="no">#attendeeupdate.adminNote#</textarea><br /><br /></td>
:
: <td><input type="submit" value="Update This
: User" /></td>
:
: </tr>
:
: </cfform>
:
: </cfoutput>
:
: </table>
:
: </td>
:
: </tr>
:
: </table>
:
:
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4