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

From: Date: Tue, 12 Feb 2008 21:24:02 +0000
Subject: cvs: pear /MDB2/MDB2/Driver/Function ibase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-50988@lists.php.net to get a copy of this message
quipo Tue Feb 12 21:24:02 2008 UTC Modified files: /pear/MDB2/MDB2/Driver/Function ibase.php Log: - replace(): not capable - length(): use UDF function STRLEN http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Function/ibase.php?r1=1.5&r2=1.6&diff_format=u Index: pear/MDB2/MDB2/Driver/Function/ibase.php diff -u pear/MDB2/MDB2/Driver/Function/ibase.php:1.5 pear/MDB2/MDB2/Driver/Function/ibase.php:1.6 --- pear/MDB2/MDB2/Driver/Function/ibase.php:1.5 Wed Mar 1 12:15:33 2006 +++ pear/MDB2/MDB2/Driver/Function/ibase.php Tue Feb 12 21:24:02 2008 @@ -42,7 +42,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.5 2006/03/01 12:15:33 lsmith Exp $ +// $Id: ibase.php,v 1.6 2008/02/12 21:24:02 quipo Exp $ require_once 'MDB2/Driver/Function/Common.php'; @@ -69,5 +69,40 @@ } // }}} + // {{{ length() + + /** + * return string to call a function to get a replacement inside an SQL statement. + * + * @return string to call a function to get a replace + * @access public + */ + function length($expression) + { + return "STRLEN($expression)"; + } + + // }}} + // {{{ replace() + + /** + * return string to call a function to get a replacement inside an SQL statement. + * + * @return string to call a function to get a replace + * @access public + */ + function replace($str, $from_str, $to_str) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $error =& $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'method not implemented', __FUNCTION__); + return $error; + } + + // }}} } ?> \ No newline at end of file

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