It should be commentDate > #dateAdd("n", -10, now())#.

cheers,
barneyb

On 9/21/05, Saturday (Stuart Kidd) <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm inserting some user comments into a database.  When done, they
> insert articleID, ipAddress and commentDate (the date when they were
> submitted).
>
> Before a comment gets added i check the database to see whether there
> already exists a comment from the same IP Address in the last 10
> minutes... but unfortunately I can't seem to work out the actual
> WHERE statement.
>
>   <cfquery name="searchComments" datasource="user020">
> SELECT articleID, ipAddress, commentDate
> FROM tbl_020publicComments
> WHERE articleID = #URL.ID# AND ipAddress = '#cgi.REMOTE_ADDR#' AND
> commentDate < #DateAdd('n', 10, UKTodayDate)#
>   </cfquery>
>
> Can anyone help me out?
>
> Thanks,
>
> Saturday
>
> ps: i've already played around with <cfcookie> but this only persists
> in a browser, but some people (like most of us) have more than one
> browser.
>

--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 100 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218890
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to