Welcome Guest, Not a member yet? Register   Sign In
MYSQL and UNIX timestamps...
#18

[eluser]mddd[/eluser]
I agree that you shouldn't use a string. But the Mysql date/time types are not strings. You SEE them as strings, but Mysql stores them as dates. You can do all kinds of calculations with them. And if you would like to get the full date in text, you can do SELECT DATE_FORMAT(date,'%d %M %Y'). Of course you can do such things in php too, but why not select the information directly from Mysql and you don't have to worry about all of that.

So, if you store stuff that is a date or date+time, just use the functions that are available for it!


Messages In This Thread
MYSQL and UNIX timestamps... - by El Forum - 04-07-2010, 06:53 PM
MYSQL and UNIX timestamps... - by El Forum - 04-07-2010, 11:32 PM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 12:20 AM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 07:31 AM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 07:38 AM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 08:58 AM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 09:04 AM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 10:15 AM
MYSQL and UNIX timestamps... - by El Forum - 04-08-2010, 05:19 PM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 12:48 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 05:45 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 05:56 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 06:01 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 06:15 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 06:38 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 06:43 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 06:56 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 07:00 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 07:11 AM
MYSQL and UNIX timestamps... - by El Forum - 04-09-2010, 06:14 PM
MYSQL and UNIX timestamps... - by El Forum - 04-12-2010, 12:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB