>I have a datetime field that records date and time. This field records
when rec is created. I also have a timestamp field that records
whenever the record is updated. I noticed that when i first create the
record, the update time is about 3-5 minutes before the create time.
The update time and create time has to be identical. How can one lag
the other? Im executing sql from a php page.
How do you create the record? If you do something like:
INSERT INTO record values (created, modified) VALUES
('2005-6-8 16:02', null);
the 'created' field gets the current time from the CLIENT computer
(which formatted the '2005-6-8 16:02' string somehow), and the
modified field gets the current time from the SERVER computer.
In this case you could use:
INSERT INTO record values (created, modified) VALUES
(now(), null);
which would use the server clock for both.
Gordon L. Burditt