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
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
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
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