Changeset 18609 for tmp/version-2_5-test/data/module/DB/msql.php
- Timestamp:
- 2010/03/11 10:35:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tmp/version-2_5-test/data/module/DB/msql.php
r15532 r18609 22 22 * @package DB 23 23 * @author Daniel Convissor <danielc@php.net> 24 * @copyright 1997-200 5The PHP Group24 * @copyright 1997-2007 The PHP Group 25 25 * @license http://www.php.net/license/3_0.txt PHP License 3.0 26 26 * @version CVS: $Id$ … … 46 46 * @package DB 47 47 * @author Daniel Convissor <danielc@php.net> 48 * @copyright 1997-200 5The PHP Group48 * @copyright 1997-2007 The PHP Group 49 49 * @license http://www.php.net/license/3_0.txt PHP License 3.0 50 * @version Release: @package_version@50 * @version Release: 1.7.14RC1 51 51 * @link http://pear.php.net/package/DB 52 52 * @since Class not functional until Release 1.7.0 … … 154 154 * ); 155 155 * 156 * $db = &DB::connect($dsn, $options);156 * $db = DB::connect($dsn, $options); 157 157 * if (PEAR::isError($db)) { 158 158 * die($db->getMessage()); … … 191 191 $params); 192 192 } else { 193 ini_set('track_errors', 1);193 @ini_set('track_errors', 1); 194 194 $this->connection = @call_user_func_array($connect_function, 195 195 $params); 196 ini_set('track_errors', $ini);196 @ini_set('track_errors', $ini); 197 197 } 198 198 … … 252 252 // Determine which queries that should return data, and which 253 253 // should return an error code only. 254 if ( DB::isManip($query)) {254 if ($this->_checkManip($query)) { 255 255 $this->_result = $result; 256 256 return DB_OK; … … 351 351 function freeResult($result) 352 352 { 353 return @msql_free_result($result);353 return is_resource($result) ? msql_free_result($result) : false; 354 354 } 355 355 … … 444 444 do { 445 445 $this->pushErrorHandling(PEAR_ERROR_RETURN); 446 $result = &$this->query("SELECT _seq FROM ${seqname}");446 $result = $this->query("SELECT _seq FROM ${seqname}"); 447 447 $this->popErrorHandling(); 448 448 if ($ondemand && DB::isError($result) && … … 532 532 533 533 // }}} 534 // {{{ quoteFloat() 535 536 /** 537 * Formats a float value for use within a query in a locale-independent 538 * manner. 539 * 540 * @param float the float value to be quoted. 541 * @return string the quoted string. 542 * @see DB_common::quoteSmart() 543 * @since Method available since release 1.7.8. 544 */ 545 function quoteFloat($float) { 546 return $this->escapeSimple(str_replace(',', '.', strval(floatval($float)))); 547 } 548 549 // }}} 534 550 // {{{ escapeSimple() 535 551 … … 599 615 { 600 616 static $error_regexps; 617 618 // PHP 5.2+ prepends the function name to $php_errormsg, so we need 619 // this hack to work around it, per bug #9599. 620 $errormsg = preg_replace('/^msql[a-z_]+\(\): /', '', $errormsg); 621 601 622 if (!isset($error_regexps)) { 602 623 $error_regexps = array(
Note: See TracChangeset
for help on using the changeset viewer.