Changeset 10044

Show
Ignore:
Timestamp:
11/29/08 14:58:41 (1 month ago)
Author:
afz
Message:

Update Pear::MDB2

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/jaws/html/libraries/pear/MDB2.php

    r9561 r10044  
    4444// +----------------------------------------------------------------------+ 
    4545// 
    46 // $Id: MDB2.php,v 1.332 2008/09/24 06:10:09 afz Exp $ 
     46// $Id: MDB2.php,v 1.335 2008/11/29 14:57:01 afz Exp $ 
    4747// 
    4848 
     
    29492949        $positions = array(); 
    29502950        $position  = 0; 
    2951         $ignores   = $this->string_quoting; 
    2952         $ignores[] = $this->identifier_quoting; 
    2953         $ignores[] = $this->sql_comments; 
    29542951        while ($position < strlen($query)) { 
    29552952            $q_position = strpos($query, $question, $position); 
     
    30443041        $ignores = $this->string_quoting; 
    30453042        $ignores[] = $this->identifier_quoting; 
    3046         $ignores[] = $this->sql_comments
     3043        $ignores = array_merge($ignores, $this->sql_comments)
    30473044         
    30483045        foreach ($ignores as $ignore) { 
     
    30603057                            } 
    30613058                        } 
    3062                     } while ($ignore['escape'] && $query[($end_quote - 1)] == $ignore['escape']  && $end_quote-1 != $start_quote); 
     3059                    } while ($ignore['escape'] 
     3060                        && $end_quote-1 != $start_quote 
     3061                        && $query[($end_quote - 1)] == $ignore['escape'] 
     3062                        && (   $ignore['escape_pattern'] !== $ignore['escape'] 
     3063                            || $query[($end_quote - 2)] != $ignore['escape']) 
     3064                    ); 
     3065 
    30633066                    $position = $end_quote + 1; 
    30643067                    return $position; 
     
    32003203    { 
    32013204        return sprintf($this->options['idxname_format'], 
    3202             preg_replace('/[^a-z0-9_\$]/i', '_', $idx)); 
     3205            preg_replace('/[^a-z0-9_\-\$.]/i', '_', $idx)); 
    32033206    } 
    32043207 
     
    41224125     * Execute a prepared query statement. 
    41234126     * 
    4124      * @param   array  specifies all necessary information 
    4125      *       for bindParam() the array elements must use keys corresponding to 
    4126      *       the number of the position of the parameter. 
    4127      * @param   mixed  specifies which result class to use 
    4128      * @param   mixed  specifies which class to wrap results in 
    4129      * 
    4130      * @return mixed   a result handle or MDB2_OK on success, a MDB2 error on failure 
    4131      * 
    4132      * @access public 
     4127     * @param array specifies all necessary information 
     4128     *              for bindParam() the array elements must use keys corresponding 
     4129     *              to the number of the position of the parameter. 
     4130     * @param mixed specifies which result class to use 
     4131     * @param mixed specifies which class to wrap results in 
     4132     * 
     4133     * @return mixed MDB2_Result or integer (affected rows) on success, 
     4134     *               a MDB2 error on failure 
     4135     * @access public 
    41334136     */ 
    41344137    function &execute($values = null, $result_class = true, $result_wrap_class = false) 
     
    41604163     * @param   mixed   specifies which class to wrap results in 
    41614164     * 
    4162      * @return mixed   MDB2_Result or integer on success, a MDB2 error on failure 
    4163      * 
     4165     * @return mixed MDB2_Result or integer (affected rows) on success, 
     4166     *               a MDB2 error on failure 
    41644167     * @access  private 
    41654168     */