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 [email protected] http://mattmayers.com/ On Sat, May 29, 2010 at 6:53 PM, Travis Paul <[email protected]> wrote: > I think you're right wade I was trying to find a way to provide a MySQL > function as a default parameter so I could avoid calling time() from php but > I don't think that is possible. > > Thanks > > On Sat, May 29, 2010 at 6:39 PM, Wade Crick <[email protected]> wrote: > >> from my understanding when I use it, it is the value that would be set if >> you don't declare a value when you do an INSERT query. >> >> again, from my understanding. >> >> -wade >> >> ------------------------------ >> From: [email protected] >> Date: Sat, 29 May 2010 14:48:27 -0400 >> To: [email protected] >> Subject: [fwlug] MySQL field parameter: "default "as defined:" >> >> >> Does anyone know what this field option is for? >> My first guess was that you could specify a MySQL function such as NOW() >> or MAKETIME() but I received an Error from phpMyAdmin when trying specify >> those function. >> >> Thanks >> >> _______________________________________________ >> Fwlug mailing list >> [email protected] >> http://fortwaynelug.org/mailman/listinfo/fwlug_fortwaynelug.org >> >> > > _______________________________________________ > Fwlug mailing list > [email protected] > http://fortwaynelug.org/mailman/listinfo/fwlug_fortwaynelug.org > >
_______________________________________________ Fwlug mailing list [email protected] http://fortwaynelug.org/mailman/listinfo/fwlug_fortwaynelug.org
