> I have a table that has a timestamp - when I created the table column, I
> used column type MEDIUMINT(10). Whenever I want to write a timestamp to
my
> record, I pass the value of time() to a variable and then perform an
insert.
>
> This looked fine for my tests however more recently I wrote a guest book
and
> noticed that I have two records that were created at least 15hours apart
and
> they both have the same timestamp (8388607)
This is the maximum value you can store in a MEDIUMINT column (current
timestamp is around 1062072523)- use INT instead.. See [1].
> My second question is to ask for a solution - I've raised a post in the
> MySQL newsgroup but am open to anybody here who might be able to tell me
how
> I can use MySQL INSERT statement in addition to its TIMESTAMP function...
> I've not used it before.
The mysql function UNIX_TIMESTAMP() generates a unix timestamp, which you
could use in your sql instead of time() in php.
A TIMESTAMP column is automatically updated whenever the row changes, but
its format is not seconds since unix epoch, but YYYYMMDDHHMMSS (in its
longest form). See [2].

[1] [url]http://www.mysql.com/doc/en/Column_types.html[/url]
[2] [url]http://www.mysql.com/doc/en/DATETIME.html[/url]


Martin