[fwlug] MySQL field parameter: "default "as defined:"

Travis Paul travis at actionowl.org
Sat May 29 19:30:22 CDT 2010


Thanks Matt,
But I'd really like to store most of my date values as int(10), as unix time
is the easiet to format with php's date() function. Most of my date values
are after 1969 and int(10) is the most efficient way to store the dates.
If I store my dates as TIMESTAMP I'll have to call strtotime() on each
value.

On May 29, 2010 8:23 PM, "Matt Mayers" <matt at mattmayers.com> wrote:

If you have a column type of TIMESTAMP, you can set DEFAULT
CURRENT_TIMESTAMP to achieve this. However, keep in mind that all values are
converted from the machine's local time to UTC before being stored in a
TIMESTAMP field and automatically converted back to local time
when retrieved. http://dev.mysql.com/doc/refman/5.0/en/timestamp.html

-- 
Matt Mayers
mmayers at gmail.com
http://mattmayers.com/

On Sat, May 29, 2010 at 6:53 PM, Travis Paul <travis at actionowl.org> wrote: >
> I think you're righ...

_______________________________________________
Fwlug mailing list
Fwlug at fortwaynelug.org
http://fortwaynelug.org/mailman/listinfo/fwlug_fortwaynelug.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://fortwaynelug.org/pipermail/fwlug_fortwaynelug.org/attachments/20100529/31bab6ff/attachment.html>


More information about the Fwlug mailing list