Print Page | Close Window

automatic deleting

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=17149
Printed Date: 28 March 2026 at 3:12pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: automatic deleting
Posted By: urko
Subject: automatic deleting
Date Posted: 05 November 2005 at 1:18pm
Hi all,

Need some help with this one:

 SQL = "SELECT * FROM ad WHERE  EntryDate BETWEEN Date() And Date()-30"


Now, this part works fine, but I have realized that all records are not visible after 30days.

I would like that only records from my DB which are under catid=1 and catid=2, would be hidden after 30days and other records from catid=3,4,etc... would stay visible.

Thanks,


-------------
Urko



Replies:
Posted By: dj air
Date Posted: 05 November 2005 at 2:15pm
try

SQL = "SELECT * FROM ad WHERE  EntryDate BETWEEN Date() And Date()-30 AND (catID =1 OR CatID = 2)"

i think that s what you wnt



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net