I have a table, with around 30 columns.
It is being used by few different PHP pages.
I’m going to add a time column to this table. Rows posted 3 months or before will not be selected in the queries.
So, I’ve got few ideas on my mind.
- Add a “timestamp” column with INT, use PHP microtime() for calculations.
- Rely on PHP’s date functions.
-
Handle this process in MySQL itself.
- I was about to use the first option, because it’s pretty easy to maintain integers.
- I always worried about the standartisation of PHP’s date functions so never relied on them before. For example, in one table I can do 12.12.2012 and in another table I can do 12.12.2012 13:00 or something similar.
- The website runs on shared hosting, so in the future I may move another hosting and I don’t know if “Export Wizard” also exports those preset values/triggers etc.
In short, how would you do this? Is there anything else you can suggest to me?
I think it would perform much better if MySQL did everything.
Would something like the following work?