Answered
Retrieving records by date
I've been having a tough time with retrieving records before
a certain date.
I had this code working on a site in the past and for some reason, it's not working anymore - don't know if it's because of a ColdFusion upgrade or if I missed something.
I am trying to bring up only records that have a date code from earlier than now (so we can set up some records to appear on the site later...)
I am using:
SELECT PostID, Title, Post, ImageBox, DatePosted, Active
FROM TheRecords
WHERE (DatePosted < #Now()#) AND (Active = 'Yes')
ORDER BY DatePosted DESC
Though it doesn't give an error, it seems to retrieve all of the records, even those that are scheduled for later.
Any ideas?
Thanks!
Luc
I had this code working on a site in the past and for some reason, it's not working anymore - don't know if it's because of a ColdFusion upgrade or if I missed something.
I am trying to bring up only records that have a date code from earlier than now (so we can set up some records to appear on the site later...)
I am using:
SELECT PostID, Title, Post, ImageBox, DatePosted, Active
FROM TheRecords
WHERE (DatePosted < #Now()#) AND (Active = 'Yes')
ORDER BY DatePosted DESC
Though it doesn't give an error, it seems to retrieve all of the records, even those that are scheduled for later.
Any ideas?
Thanks!
Luc