Jump to content

Easiest way to append a time to a submittal via php to mysql


twilightnights

Recommended Posts

You could use a DATETIME field.

To insert the time in the database you would use NOW()

ex:

[code]

INSERT INTO table (time) VALUES ( NOW()));

[/code]

If you just used a time field and sorted by the time it was submitted, I would think it would get all mixed up the next day beacause it doesn't know the date it was submitted as well.
does curtime include date, month, year, etc? Or do you have to make seperate fields for each of these.  Not exactly sure how searching would work with this.. for example 12232005 is greater mathematically to 09232006

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.