Author Topic: Unable to save Timestamp in Mysql using php-shows 00-00-0000  (Read 10671 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?

IfandBut.com helps you to keep yourself updated with latest internet business trends.
Join Now!
anything