Can I use 2 date type in 1 mysql table? because for some reason when I insert records for 2 different dates it doesnt work, only the first date is working the other one shows 00-00-00?
Thank you for your time and help
Can I use 2 date type in 1 mysql table? because for some reason when I insert records for 2 different dates it doesnt work, only the first date is working the other one shows 00-00-00?
Thank you for your time and help
I will assume you are using a TIMESTAMP data type, and you want it to default to CURRENT_TIMESTAMP.
Only one TIMESTAMP column in a table can automatically be set on INSERT or UPDATE - and by default, MySQL goes with the first one.
If you would like to have more than one TIMESTAMP column get updated automatically on INSERT or UPDATE, you will need to turn to triggers.
The docs on the TIMESTAMP data type are a good read!
Edit: if this educated guess does not answer your rather vaguely-phrased question, you will probably want to update your question with an example of the queries you are running, and what exactly is happening/not happening afterward.