Posted by Jerry Stuckle on 09/11/06 00:47
turnitup wrote:
> I have found that by far the easiest way to store dates in my LAMP
> application is in a text string in the database in Unixtime format.
>
> First of all, what would be the most efficient data type to store this as?
>
> Secondly, in terms of translating into a human readable format, is it
> quicker to format the date in the application using date() or in the
> database in the select query?
>
> Any thoughts?
I use the DATE type that's defined in the database. That's what it's
there for.
You can format the data in almost any way you want using database
functions when retrieving the data. Additionally, you can easily
compare dates in the database.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|