Author Topic: Unable to save Timestamp in Mysql using php-shows 00-00-0000  (Read 5761 times)

Rahul Kaushik

  • Newbie
  • *
  • Posts: 18
Unable to save Timestamp in Mysql using php-shows 00-00-0000
« on: December 02, 2011, 11:12:01 AM »
I am trying to create a script in which I need to save unix timestamp directly into database but whenever I add it, the query goes successful however when I see the data in database it is coming as :
0000-00-00 00:00:00

I tried to conver it using strtotime() function but still no gain.

Kindly guide!

phpdeveloper

  • Newbie
  • *
  • Posts: 39
Re: Unable to save Timestamp in Mysql using php-shows 00-00-0000
« Reply #1 on: December 22, 2011, 06:30:33 AM »
I think there is no problem in your query but there should be a problem in your database
if you are saving your date in int or tinyint it cant save time stamp in the int or tiny int
but you have to save this format in varchar hope fully it wil work finr for you...
     
 phpdeveloper

 

X

Do you know?

Just make posts in this community and win .com / .org / .net domain name free.
Know more..
Join Now!