Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

select a date....

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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
cho@
New php-forum User
New php-forum User
 
Posts: 39
Joined: Tue Aug 06, 2002 8:58 am
Location: UK

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
vvlad
New php-forum User
New php-forum User
 
Posts: 3
Joined: Fri Sep 06, 2002 3:21 am


Return to PHP coding => General

Who is online

Users browsing this forum: Bing [Bot] and 4 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.