use timestamp instead of a string to store a date in the DB
For example, look at the uptime table in the realmd db: [url]http://getmangos.eu/wiki/Reference%20Information/DB/realm/uptime.md[/url]
[QUOTE]
Field 'starttime'
The time when the server was started, in Unix time.
Field 'startstring'
The time when the server started, formated as a readable string.
[/QUOTE]
Both fields contain the same: a date. But they are stored differently. Every date in the database should be either stored as a string or as a timestamp. It shouldn't be mixed so both exists. I think it is better to use everywhere in the database for a date a timestamp for performance reasons.
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now