jiturc889 Posted June 28, 2007 Share Posted June 28, 2007 hello, I am facing one problem in php, mysql whenever i submit empty date to db, it automatically takes timestamp as 943900200 ('30-11-1999') which is creating problems in my application..... currently handling this problem by hard coding timestamp validation..... If anyone knows anything , please suggest a solution... thanking in advance Quote Link to comment Share on other sites More sharing options...
phpknight Posted June 28, 2007 Share Posted June 28, 2007 I am not sure why you would want to send an empty date. You can use NOW(), and that will give you the current date. Will that work for you? Quote Link to comment Share on other sites More sharing options...
jiturc889 Posted June 28, 2007 Author Share Posted June 28, 2007 actually in my form , there r 5 dates to be selected by user, but whenever he dont have anyone date, he just leaves tht, yes, n he can update it later.. but in the case i cant make them compulsary fields, user can/can not have all the dates at the time.... Quote Link to comment Share on other sites More sharing options...
phpknight Posted June 28, 2007 Share Posted June 28, 2007 What about if you tested for an empty date and then just left the database with the default? So, if they pick one, you insert it. If they don't, you do a different query. Quote Link to comment 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.