select a date....

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

cho@
New php-forum User
New php-forum User
Posts: 39
Joined: Tue Aug 06, 2002 8:58 am
Location: UK

select a date....

Postby cho@ » Thu Sep 12, 2002 5:18 am

Hi
i'd like to delete all the data in a table which are stored since more dan one month....

DELETE FROM table WHERE datefiled > NOW()+ one month.....

is it possible to do like dat.....

how do i had a month to NOW().....
i use a Mysql database...

thanks for ur help

bye

vvlad
New php-forum User
New php-forum User
Posts: 3
Joined: Fri Sep 06, 2002 3:21 am

Postby vvlad » Thu Sep 12, 2002 6:48 am

Hi
I think you should try this
DELETE FROM table WHERE TO_DAYS(datefiled) < TO_DAYS(NOW())-30


Return to “PHP coding => General”

Who is online

Users browsing this forum: Google Feedfetcher and 2 guests