|
|
I have am update screen that allows the users to update the 'payment date' on a
record. A simple query should load the available dates to be used to update
this value.
The value that appears on the screen is the current value of
get_record.payment_date, but when you click on the drop-down arrow, you get all
the values in the calendar table, not just the answerset from the query. Any
ideas why?
Query:
<cfquery name="get_record" datasource="#attributes.datasource1#"
dbtype="ODBC">
SELECT * from external_transaction
WHERE sequence_number = #session.gdsequence_number#
</cfquery>
<cfset session.today=#DateFormat(Now(),'mm/dd/yyyy')#>
<cfquery name="calendar" datasource="#attributes.datasource1#">
SELECT date
FROM calendar
WHERE (calendar.date >= #session.today#)
AND calendar.type = 'B'
order by date
</cfquery>
Table entry (only part of it):
<td align="right">Payment Date:</td>
<td align="left"><select name="payment_date" size="1">
<cfoutput><option
selected>#dateformat(get_record.payment_date ,
"MM/DD/YY")# #dayofweekasstring(dayofweek(get_record.payment_date))#<
/option></cfoutput>
<cfoutput query="calendar">
<option>#dateformat(calendar.date ,
"MM/DD/YY")# #dayofweekasstring(dayofweek(calendar.date))#</option>
</cfoutput>
</select></td>
|
|