Re: how to delete records older than 14 days

2001-01-29 Thread Angela
DELETE FROM news WHERE newsdate=DATE_ADD(CURRENT_DATE, INTERVAL -14 DAY) Above is the code that I would use to do that job. Hope this helps. -Angela Thomas Katsampes wrote: > > Hello, > > I'm trying to figure out the correct syntax for requesting > the database to > remove all records older

Re: how to delete records older than 14 days

2001-01-27 Thread Peter Pentchev
On Sat, Jan 27, 2001 at 09:58:23AM -0600, Thomas Katsampes wrote: > Hello, > > I'm trying to figure out the correct syntax for requesting > the database to > remove all records older than 14 days. The mysql query that > I am using (from within > php4) is: > > //---update news so only last two w

Re: how to delete records older than 14 days

2001-01-27 Thread Bob Hall
Sir, your DELETE statement runs fine on my computer. The problem appears to be in your PHP code. Post the problem to a PHP group with all the relevant lines, not just the two shown below. >Hello, > >I'm trying to figure out the correct syntax for requesting >the database to >remove all records

how to delete records older than 14 days

2001-01-27 Thread Thomas Katsampes
Hello, I'm trying to figure out the correct syntax for requesting the database to remove all records older than 14 days. The mysql query that I am using (from within php4) is: //---update news so only last two weeks of news are available---// $sql2 = "delete from news where newsdate < DATE_S