Ignore:
Timestamp:
2010/03/11 10:35:11 (16 years ago)
Author:
kajiwara
Message:

正式版にナイトリービルド版をマージしてみるテスト

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tmp/version-2_5-test/data/module/DB/dbase.php

    r15532 r18609  
    1919 * @author     Tomas V.V. Cox <[email protected]> 
    2020 * @author     Daniel Convissor <[email protected]> 
    21  * @copyright  1997-2005 The PHP Group 
     21 * @copyright  1997-2007 The PHP Group 
    2222 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0 
    2323 * @version    CVS: $Id$ 
     
    4040 * @author     Tomas V.V. Cox <[email protected]> 
    4141 * @author     Daniel Convissor <[email protected]> 
    42  * @copyright  1997-2005 The PHP Group 
     42 * @copyright  1997-2007 The PHP Group 
    4343 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0 
    44  * @version    Release: @package_version@ 
     44 * @version    Release: 1.7.14RC1 
    4545 * @link       http://pear.php.net/package/DB 
    4646 */ 
     
    189189     * ); 
    190190     * 
    191      * $db =& DB::connect($dsn, $options); 
     191     * $db = DB::connect($dsn, $options); 
    192192     * if (PEAR::isError($db)) { 
    193193     *     die($db->getMessage()); 
     
    215215         * is the only way to find errors from the dbase extension. 
    216216         */ 
    217         ini_set('track_errors', 1); 
     217        @ini_set('track_errors', 1); 
    218218        $php_errormsg = ''; 
    219219 
     
    274274        // emulate result resources 
    275275        $this->res_row[(int)$this->result] = 0; 
    276         $tmp =& new DB_result($this, $this->result++); 
     276        $tmp = new DB_result($this, $this->result++); 
    277277        return $tmp; 
    278278    } 
     
    327327 
    328328    // }}} 
     329    // {{{ freeResult() 
     330 
     331    /** 
     332     * Deletes the result set and frees the memory occupied by the result set. 
     333     * 
     334     * This method is a no-op for dbase, as there aren't result resources in 
     335     * the same sense as most other database backends. 
     336     * 
     337     * @param resource $result  PHP's query result resource 
     338     * 
     339     * @return bool  TRUE on success, FALSE if $result is invalid 
     340     * 
     341     * @see DB_result::free() 
     342     */ 
     343    function freeResult($result) 
     344    { 
     345        return true; 
     346    } 
     347 
     348    // }}} 
    329349    // {{{ numCols() 
    330350 
     
    369389 
    370390    // }}} 
    371     // {{{ quoteSmart() 
    372  
    373     /** 
    374      * Formats input so it can be safely used in a query 
    375      * 
    376      * @param mixed $in  the data to be formatted 
    377      * 
    378      * @return mixed  the formatted data.  The format depends on the input's 
    379      *                 PHP type: 
    380      *                 + null = the string <samp>NULL</samp> 
    381      *                 + boolean = <samp>T</samp> if true or 
    382      *                   <samp>F</samp> if false.  Use the <kbd>Logical</kbd> 
    383      *                   data type. 
    384      *                 + integer or double = the unquoted number 
    385      *                 + other (including strings and numeric strings) = 
    386      *                   the data with single quotes escaped by preceeding 
    387      *                   single quotes then the whole string is encapsulated 
    388      *                   between single quotes 
    389      * 
     391    // {{{ quoteBoolean() 
     392 
     393    /** 
     394     * Formats a boolean value for use within a query in a locale-independent 
     395     * manner. 
     396     * 
     397     * @param boolean the boolean value to be quoted. 
     398     * @return string the quoted string. 
    390399     * @see DB_common::quoteSmart() 
    391      * @since Method available since Release 1.6.0 
    392      */ 
    393     function quoteSmart($in) 
    394     { 
    395         if (is_int($in) || is_double($in)) { 
    396             return $in; 
    397         } elseif (is_bool($in)) { 
    398             return $in ? 'T' : 'F'; 
    399         } elseif (is_null($in)) { 
    400             return 'NULL'; 
    401         } else { 
    402             return "'" . $this->escapeSimple($in) . "'"; 
    403         } 
    404     } 
    405  
     400     * @since Method available since release 1.7.8. 
     401     */ 
     402    function quoteBoolean($boolean) { 
     403        return $boolean ? 'T' : 'F'; 
     404    } 
     405      
    406406    // }}} 
    407407    // {{{ tableInfo() 
Note: See TracChangeset for help on using the changeset viewer.