Hi John,

If you really are using Date as a field type I
would change it to tipdate or something more
descriptive then just date. I use DreamWeaver
for my code work and when inserting a recordset
the program quotes the word date, which is
indicative of a reserved word. Plus giving it
a unique name will give it more meaning and it
will stand out from other date fields in your
table.
 
That said, below is a query I set up and tested
before posting and it worked as I believe you are
wanting yours to work.

<cfset tipdate = #CreateODBCDate(now())#>

<cfquery name="rs_dailytip" datasource="MyDSN">
SELECT record_id, tipdate, dailytip
FROM daily_tip 
WHERE tipdate = #tipdate# <=== Note no quotation marks
</cfquery>

I would suggest having your output code inside a
cfif statement, so that if for some reason there
is not a tip for the day the rest of the page
content will flow properly.

<cfif rs_dailytip.recordcount>
     <cfoutput>#rs_dailytip.dailytip#</cfoutput>
</cfif>

Hope this helps you out.

Leonard



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3780
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to