Re: Addtime is for 4.1, what can i use for 3.23? (pretty much 0T)

From: Date: Wed, 31 May 2006 00:52:51 +0000
Subject: Re: Addtime is for 4.1, what can i use for 3.23? (pretty much 0T)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-237114@lists.php.net to get a copy of this message
Ryan A wrote:
Hey, To simplify this lets say my table looks like this: a time default NULL, b time default NULL This is what i run: INSERT INTO test2 VALUES (Curtime( ) , ADDTIME(Curtime( ) , "00:01:00")) since the db is version 3.23 (I cant ask the client to upgrade) instead of 4.1, the above SQL is not possible and this: SELECT curtime( ) + INTERVAL 60 minute is giving me null, has anybody else faced this? if so how did you solve this?
What does select curtime(); give you? Make sure that's valid before trying to add to it.. Could also try: select now() + interval 1 hour; should come back the same (I think anyway). -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#237114) next »