bladez Posted May 17, 2007 Share Posted May 17, 2007 ok i am going straight to the point. i have a db that stores a date in a table with a specific column. db=test table=test_date_compare column name=date_inserted ok i hv a php form that allows user to input date and it enters in the above column (date) as in format eg: 21/03/2007 now i wat i would like to do is i would like to compare date of today and the date in the database if it is lesser then todays date it deletes that row of data. deleting the row of data i know how but the problem comes wen coparing the date i dunno how to ... so can anyone assist me on this pls ...thank you very much. Quote Link to comment https://forums.phpfreaks.com/topic/51807-date-compare-problemhelp-pls/ Share on other sites More sharing options...
vbnullchar Posted May 17, 2007 Share Posted May 17, 2007 sql="delete from test_date_compare where date<'$_post[user_date]'"; Quote Link to comment https://forums.phpfreaks.com/topic/51807-date-compare-problemhelp-pls/#findComment-255260 Share on other sites More sharing options...
bladez Posted May 17, 2007 Author Share Posted May 17, 2007 well tat statement u put i knew it b4 this...my problem is comparing todays date n the date in the database ... abt deleting i know how to do it ... Quote Link to comment https://forums.phpfreaks.com/topic/51807-date-compare-problemhelp-pls/#findComment-255620 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.