Solved

proper type for unix time in mysql database

Posted on 2014-01-11
3
276 Views
Last Modified: 2014-01-11
What is the proper way to store unix time in a mysql database.  I have it as int(10) but I am not sure that is right.  Thanks
0
Comment
Question by:Luey
  • 2
3 Comments
 
LVL 58

Expert Comment

by:Gary
Comment Utility
int(10) is fine - is there a reason you don't think it is?
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
Comment Utility
I recommend either DATETIME or TIMESTAMP, depending on what you're trying to accomplish.  This article explains some of it.  You might want to read the entire article.  The part you're asking about can be found by searching Storing Date and Time in Your Database
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_201-Handling-date-and-time-in-PHP-and-MySQL.html
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
Thanks for the points, and thanks for using EE, ~Ray
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now