Re: cvs: pear /MDB2/MDB2/Driver/Function ibase.php

From: Date: Sun, 16 Oct 2005 21:59:43 +0000
Subject: Re: cvs: pear /MDB2/MDB2/Driver/Function ibase.php
References: 1  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35624@lists.php.net to get a copy of this message
Lorenzo Alberton wrote:
quipo Sun Oct 16 17:57:57 2005 EDT
  Modified files:                  /pear/MDB2/MDB2/Driver/Function	ibase.php   Log:
implement now() http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Function/ibase.php?r1=1.1&r2=1.2&ty=u Index: pear/MDB2/MDB2/Driver/Function/ibase.php diff -u pear/MDB2/MDB2/Driver/Function/ibase.php:1.1 pear/MDB2/MDB2/Driver/Function/ibase.php:1.2 --- pear/MDB2/MDB2/Driver/Function/ibase.php:1.1 Sun Oct 16 04:56:51 2005 +++ pear/MDB2/MDB2/Driver/Function/ibase.php Sun Oct 16 17:57:57 2005 @@ -42,7 +42,7 @@
 // | Author: Lorenzo Alberton <l.alberton@quipo.it>                       |
// +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.1 2005/10/16 08:56:51 lsmith Exp $ +// $Id: ibase.php,v 1.2 2005/10/16 21:57:57 quipo Exp $ require_once 'MDB2/Driver/Function/Common.php'; @@ -55,5 +55,23 @@ */ class MDB2_Driver_Function_ibase extends MDB2_Driver_Function_Common {
+    // {{{ now()
+
+    /**
+     * Return string to call a variable with the current timestamp inside an SQL statement
+     * There are three special variables for current date and time:
+     * - CURRENT_TIMESTAMP (date and time, TIMESTAMP type)
+     * - CURRENT_DATE (date, DATE type)
+     * - CURRENT_TIME (time, TIME type)
+     *
+     * @return string to call a variable with the current timestamp
+     * @access public
+     */
+    function now()
+    {
+        return 'CURRENT_TIMESTAMP';
+    }
+
+    // }}}
hmm .. actually this should probably be the default implementation .. regards, Lukas

« previous php.pear.cvs (#35624) next »