cvs: pear /DB package.xml /DB/DB sybase.php

From: Date: Tue, 06 Feb 2007 07:12:11 +0000
Subject: cvs: pear /DB package.xml /DB/DB sybase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-44560@lists.php.net to get a copy of this message
aharvey Tue Feb 6 07:12:11 2007 UTC Modified files: /pear/DB package.xml /pear/DB/DB sybase.php Log: Added a specific DB_sybase::quoteFloat() implementation along the same lines as fbsql. http://cvs.php.net/viewvc.cgi/pear/DB/package.xml?r1=1.224&r2=1.225&diff_format=u Index: pear/DB/package.xml diff -u pear/DB/package.xml:1.224 pear/DB/package.xml:1.225 --- pear/DB/package.xml:1.224 Tue Feb 6 06:05:01 2007 +++ pear/DB/package.xml Tue Feb 6 07:12:11 2007 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1" ?> <package version="1.0"> - <!-- $Id: package.xml,v 1.224 2007/02/06 06:05:01 aharvey Exp $ --> + <!-- $Id: package.xml,v 1.225 2007/02/06 07:12:11 aharvey Exp $ --> <name>DB</name> <summary>Database Abstraction Layer</summary> <description> @@ -74,6 +74,7 @@ sybase: * Added divide by zero error mapping. +* Added a specific quoteFloat() implementation along the same lines as fbsql. ]]></notes> <filelist> <file name="DB.php" role="php" baseinstalldir="/"> http://cvs.php.net/viewvc.cgi/pear/DB/DB/sybase.php?r1=1.83&r2=1.84&diff_format=u Index: pear/DB/DB/sybase.php diff -u pear/DB/DB/sybase.php:1.83 pear/DB/DB/sybase.php:1.84 --- pear/DB/DB/sybase.php:1.83 Tue Feb 6 06:05:01 2007 +++ pear/DB/DB/sybase.php Tue Feb 6 07:12:11 2007 @@ -21,7 +21,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: sybase.php,v 1.83 2007/02/06 06:05:01 aharvey Exp $ + * @version CVS: $Id: sybase.php,v 1.84 2007/02/06 07:12:11 aharvey Exp $ * @link http://pear.php.net/package/DB */ @@ -529,6 +529,22 @@ } // }}} + // {{{ quoteFloat() + + /** + * Formats a float value for use within a query in a locale-independent + * manner. + * + * @param float the float value to be quoted. + * @return string the quoted string. + * @see DB_common::quoteSmart() + * @since Method available since release 1.7.8. + */ + function quoteFloat($float) { + return $this->escapeSimple(str_replace(',', '.', strval(floatval($float)))); + } + + // }}} // {{{ autoCommit() /**

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