Changeset 1685
- Timestamp:
- 01/06/2008 03:49:44 AM (12 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/drivers/Database.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/drivers/Database.php
r1642 r1685 25 25 * 26 26 * @param string $sql 27 * @return Mysql_Result27 * @return Database_Result 28 28 */ 29 29 abstract public function query($sql); … … 151 151 $prefix = ($num_likes == 0) ? '' : $type; 152 152 153 $match = (substr($match, 0, 1) == '%' OR substr($match, (strlen($match)-1), 1) == '%') 154 ? $this->escape_str($match) 153 $match = (substr($match, 0, 1) == '%' OR substr($match, (strlen($match)-1), 1) == '%') 154 ? $this->escape_str($match) 155 155 : '%'.$this->escape_str($match).'%'; 156 156 … … 171 171 $prefix = ($num_likes == 0) ? '' : $type; 172 172 173 $match = (substr($match, 0, 1) == '%' OR substr($match, (strlen($match)-1), 1) == '%') 174 ? $this->escape_str($match) 173 $match = (substr($match, 0, 1) == '%' OR substr($match, (strlen($match)-1), 1) == '%') 174 ? $this->escape_str($match) 175 175 : '%'.$this->escape_str($match).'%'; 176 176 … … 238 238 239 239 /** 240 * Initiates a prepared statement.240 * Creates a prepared statement. 241 241 * 242 242 * @param string $sql 243 * @param string $label 244 * @return boolean 245 */ 246 abstract public function stmt_prepare($sql = '', $label); 247 248 /** 249 * Executes a prepared statement. 250 * 251 * @param string $sql 252 * @param string $label 253 * @return boolean 254 */ 255 abstract public function stmt_execute($vals = array(), $label); 256 257 /** 258 * Destroys a prepared statement. 259 * 260 * @param string $sql 261 * @param string $label 262 * @return boolean 263 */ 264 abstract public function stmt_clear($label); 243 * @return Database_Stmt 244 */ 245 abstract public function stmt_prepare($sql = ''); 265 246 266 247 /** … … 446 427 * @param bool $object 447 428 * @param mixed $type 448 * @return object429 * @return Database_Result 449 430 */ 450 431 public function result($object = TRUE, $type = FALSE);
