// use a MySQL function to insert a MySQL timestamp into a date/time field
$qry="update some_table set my_timestamp = now() where my_key='foo'";
$res=mysql_query($res);
// use PHP to insert a UNIX timestamp into a field (could be many types, varchar, text, int,
// bigint, etc. Keep in mind that the time since the epoch was 1137580839 as of this
// writing, so you need at least that big a field....
$qry="update some_table set my_timestamp = ". time() ."where my_key='foo'";
$res=mysql_query($res);
I prefer the latter, as I can concentrate less on MySQL's language and more on PHP, but YMMV, of course, and the best programmers are quite comfortable with either usage. The latter probably has the disadvantage of using a tad more storage, but I'm not sure about this; it's possible that MySQL actually uses a UNIX timestamp internally to store the data, anyway.....