RE: [PHP-DB] Need Help on subtract Time

From: Date: Wed, 14 Nov 2001 20:56:54 +0000
Subject: RE: [PHP-DB] Need Help on subtract Time
Groups: php.db 
Request: Send a blank email to php-db+get-14343@lists.php.net to get a copy of this message
select * from tablename where time < now() - interval 2 minute this assumes the field "time" is defined as TIMESTAMP -----Original Message----- From: kelvin [mailto:kelvin_y@decode-ent.com] Sent: Wednesday, November 14, 2001 2:49 PM To: php-db@lists.php.net Subject: [PHP-DB] Need Help on subtract Time Hi everyone, I have a table with those field. ---> Username, Uid, and Time. Ok, I tried to select data which their time is 2 min less from the current time or so. Could anyone help me out, How to do it? This is what I got, but doesn't work. ---- "select * from tablename where time < date("H:i:s",(time()-720))"; Please help!!! Thanks. Kelvin -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#14343) next »