mysql date storage & query performance with php -


I have a database of historical records from WW2, and presently the date of each recorded event in an integer field of YYMMDDHHMM Has been stored in the form. It is easy to find all the events, such as by ordinary order, or within a certain time period. However, if any one is on December 1, all events occurring in any year of the war is a bit of a pain and showing visitors the records that breaking into 5 variables for the purpose of making string for ugly PHP code needed. . (Well, at least when I write it, ha)

Does anyone have the idea of ​​ display results , if we break that string into 5 discrete columns Gave? Or if we keep the original columns of those searches, then this data is useful for ease of display and is useful for columns (year, month, day, hour, minute) and adds?

This is a clear duplication of data, and not less in the same table, which is a normal type - no, is not it? But PHP seems to be very easy to things ...

Kindly thank you,

  • A
< P>

Why not use the area of ​​MySQL and make a picture related to the date related questions?


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -