Changeset 10044
- Timestamp:
- 11/29/08 14:58:41 (1 month ago)
- Files:
-
- trunk/jaws/html/libraries/pear/MDB2.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/jaws/html/libraries/pear/MDB2.php
r9561 r10044 44 44 // +----------------------------------------------------------------------+ 45 45 // 46 // $Id: MDB2.php,v 1.33 2 2008/09/24 06:10:09afz Exp $46 // $Id: MDB2.php,v 1.335 2008/11/29 14:57:01 afz Exp $ 47 47 // 48 48 … … 2949 2949 $positions = array(); 2950 2950 $position = 0; 2951 $ignores = $this->string_quoting;2952 $ignores[] = $this->identifier_quoting;2953 $ignores[] = $this->sql_comments;2954 2951 while ($position < strlen($query)) { 2955 2952 $q_position = strpos($query, $question, $position); … … 3044 3041 $ignores = $this->string_quoting; 3045 3042 $ignores[] = $this->identifier_quoting; 3046 $ignores [] = $this->sql_comments;3043 $ignores = array_merge($ignores, $this->sql_comments); 3047 3044 3048 3045 foreach ($ignores as $ignore) { … … 3060 3057 } 3061 3058 } 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 3063 3066 $position = $end_quote + 1; 3064 3067 return $position; … … 3200 3203 { 3201 3204 return sprintf($this->options['idxname_format'], 3202 preg_replace('/[^a-z0-9_\ $]/i', '_', $idx));3205 preg_replace('/[^a-z0-9_\-\$.]/i', '_', $idx)); 3203 3206 } 3204 3207 … … 4122 4125 * Execute a prepared query statement. 4123 4126 * 4124 * @param arrayspecifies all necessary information4125 * for bindParam() the array elements must use keys corresponding to4126 * the number of the position of the parameter.4127 * @param mixedspecifies which result class to use4128 * @param mixedspecifies which class to wrap results in4129 * 4130 * @return mixed a result handle or MDB2_OK on success, a MDB2 error on failure4131 * 4132 * @access public4127 * @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 4133 4136 */ 4134 4137 function &execute($values = null, $result_class = true, $result_wrap_class = false) … … 4160 4163 * @param mixed specifies which class to wrap results in 4161 4164 * 4162 * @return mixed MDB2_Result or integer on success, a MDB2 error on failure4163 * 4165 * @return mixed MDB2_Result or integer (affected rows) on success, 4166 * a MDB2 error on failure 4164 4167 * @access private 4165 4168 */
