Re: If date is greater than

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Oct 20, 2013, at 4:01 AM, Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx> wrote:

> Yes, I was going to ask, why are you storing your dates as strings?
> MySQL has a perfectly good DATE type. It's also generally faster
> comparing dates within a MySQL query than PHP code.
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk

Agreed.

Plus, there are many date functions provided by MySQL that are easier (possibility faster) than what you can do in PHP.

Check these out:

http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date

tedd

_______________
tedd sperling
tedd.sperling@xxxxxxxxx
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux