开发者

MySQL, Coldfusion, Selecting records that were timestamped in the last 24 hours

With Coldfuson & MySQL - How to update the query to check for new entries that have a timestamp that occurs in the last 24 hours?

Query:

<cfquery name="caller.sel_BlogEntries" datasource="#request.db#">
SELECT      blogentry.dateAdded, person.personName
FROM        blogentry INNER JOIN person ON blogentry.personID = person.personID
WHERE       blogentry.deleted = 'N'
ORDER BY    blogentry.dateAdded DESC
</cfquery>

blogentry.dateAdded is a MySq开发者_如何学编程l TimeStamp

Thanks


WHERE ... 
  AND DATE_ADD(blogentry.dateAdded, INTERVAL 1 DAY) >= NOW()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜