Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001062

Re: [PHP-DB] TO_DAYS() equivalent? From: Hugh Bothwell (hugh_bothwell <email protected>)
Date: 06/29/01

How about this?

define("SECONDS_PER_DAY", 86400);
$now = (int) (time() / SECONDS_PER_DAY);

Note that this may not match the time you get from your database server,
depending on what time zones you're in.

""David W. Banks"" <dwbanks <email protected>> wrote in message
news:3B3B7A7B.438A8B80 <email protected>
> Is there some way to get the equivalent of "select TO_DAYS(NOW())"
> out of PHP without querying MySQL (or whatever.) Some formatting character
> for the date() function that I'm just missing?
>
> Thanks,
> -Dave
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe <email protected>
> For additional commands, e-mail: php-db-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>