Changeset 891
- Timestamp:
- 10/25/2007 03:50:45 PM (13 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/drivers/Database_Mysql.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/drivers/Database_Mysql.php
r864 r891 80 80 public function delete($table, $where) 81 81 { 82 return 'DELETE FROM '.$this->escape_table($table).' WHERE '.implode(' ', $where);82 return 'DELETE FROM '.$this->escape_table($table).' WHERE '.implode(' ', $where); 83 83 } 84 84 … … 186 186 if ( ! $this->has_operator($k)) 187 187 { 188 $k .= ' ='; 188 $k = $this->escape_column($k).' ='; 189 } 190 else 191 { 192 // This detect the position of the operator and escape the rest... 193 //$k = $this->escape_column($k); 189 194 } 190 195 … … 242 247 public function compile_select($database) 243 248 { 244 $sql = ($database['distinct'] == TRUE) ? 'SELECT DISTINCT ' : 'SELECT ';249 $sql = ($database['distinct'] == TRUE) ? 'SELECT DISTINCT ' : 'SELECT '; 245 250 $sql .= (count($database['select']) > 0) ? implode(', ', $database['select']) : '*'; 246 251 … … 311 316 case 'string': 312 317 $str = "'".$this->escape_str($str)."'"; 313 break;318 break; 314 319 case 'boolean': 315 320 $str = (int) $str;
