Re: Alternate to timediff() (might be slightly 0T)

From: Date: Sat, 09 Apr 2005 18:49:29 +0000
Subject: Re: Alternate to timediff() (might be slightly 0T)
Groups: php.general 
Request: Send a blank email to php-general+get-212736@lists.php.net to get a copy of this message
Hmmm..... we have a new sql guru on the list eh? welcome master... :-) Thanks mate. -Ryan On 4/9/2005 8:18:10 PM, Greg Donald (destiney@gmail.com) wrote: > On Apr 9, 2005 1:09 PM, Ryan A <ryan@coinpass.com> wrote: > > > So how can I compare 2 timedates which are: > > > > > > now() and now() + 5 mins > > > > > > to see if I get a positive or negitive value? > > > > mysql> select NOW() > DATE_ADD( NOW(), INTERVAL 5 MINUTE ); > > +----------------------------------------------+ > > | NOW() > DATE_ADD( NOW(), INTERVAL 5 MINUTE ) | > > +----------------------------------------------+ > > | 0 | > > +----------------------------------------------+ > > 1 row in set (0.01 sec) > > > > mysql> select NOW() < DATE_ADD( NOW(), INTERVAL 5 MINUTE ); > > +----------------------------------------------+ > > | NOW() < DATE_ADD( NOW(), INTERVAL 5 MINUTE ) | > > +----------------------------------------------+ > > | 1 | > > +----------------------------------------------+ > > 1 row in set (0.00 sec) > > > > > > -- > > Greg Donald -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.9.5 - Release Date: 4/7/2005

« previous php.general (#212736) next »