here's how I do it on my events calendar, using SQL. I believe it
also can be done in the CFOUTPUT tag. I prefer to put the onus on
the database server (NOT that I'm any expert):
<CFQUERY NAME="todays_event" DATASOURCE="dch">
SELECT id,header,start_date
FROM (
SELECT id,header,start_date
FROM hsp_calendar
ORDER BY START_DATE ASC
)
WHERE rownum <=5
</CFQUERY>
On Mar 10, 2008, at 1:42 PM, Frank Velazquez wrote:
> Hey guys, what's up? I was wondering how could I select the last 3
> records (or more) that have been inserted into my Database, should
> I use recordcount?
>
> I need that because on my site, in the home page I want to display
> recently added stuff.
>
> Thank you!
>
> Frank V.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3401
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15