Any cold fusion coders out there?

dmurray14

Golden Member
Feb 21, 2003
1,780
0
0
Question for you guys...

I'm trying to make a news page that will automatically categorize news that is older than 2 weeks into a seperate section of the page entitled "old news", while the "new" news remains at the top. How would I have CF filter these apart?

TIA,

Dan
 

jonmullen

Platinum Member
Jun 17, 2002
2,517
0
0
First of all this should be in Programming and Software, but how is the news stored in the first place... if it is in a database it would be the function of making the SQL query for you <cfquery> to use a WHERE clause that distinguishes and returns based upon the desired dates.
 

iotone

Senior member
Dec 1, 2000
946
0
0
like jonmullen said, if everything is stored in a database, should be easy... for the new news you would do a select statement between a <cfquery> tag... maybe you might need two, 1 to query the stuff you want to stay at the top, and another to query the rest (to make your page building easier)...