I'm getting a perpetual loop from this.   Currently there are two
records in the DB at the date of the May 14th and the 24th.  If I
change the following, it displays the first record at the 14th, but
not the second on the 24th, and gives the error, "... has attempted
to use an undefined value" which  seems to indicate an
index-outta-range:
<cfif recordIndex LT calendar_rec.recordcount>
to
<cfif recordIndex LTE calendar_rec.recordcount>

Any thoughts on this code?
<!-------- whole loop ------->

<cfset recordIndex=1>
<cfset record_day=day(calendar_rec.event_date[recordIndex])>

<cfloop condition = "record_day EQ variables.currentDay">
     <cfif day(calendar_rec.event_date[recordIndex]) EQ variables.currentDay>
         <cfset day_formatted ='<a
href=""

         <cfif recordIndex LT calendar_rec.recordcount>
             <cfset recordIndex=recordIndex+1>
             <cfset record_day=day(calendar_rec.event_date[recordIndex])>
         </cfif>
     </cfif>
</cfloop>

--
Daniel Kessler

Department of Public and Community Health
University of Maryland
Suite 2387 Valley Drive
College Park, MD  20742-2611
301-405-2545 Phone
www.phi.umd.edu
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to