Which is better to get the current time for inserting to database?
Efficiency, speed, ram consumption or any other factors which make a person to use this instead of that.
Which is better to get the current time for inserting to database?
Efficiency, speed, ram consumption or any other factors which make a person to use this instead of that.
If you use real-time function like Now()
in say MySQL query, The MySQL engine will execute the query real-time to give the real-time result instead of looking the result in cache first.
So it is advisable not to use real time function directly in query, If alternate way is possible. Try to use php time()
function.