Changeset 2193
- Timestamp:
- 02/28/2008 09:47:34 PM (9 months ago)
- Location:
- trunk/system/libraries/drivers
- Files:
-
- 6 modified
-
Database.php (modified) (1 diff)
-
Database/Mssql.php (modified) (2 diffs)
-
Database/Mysql.php (modified) (3 diffs)
-
Database/Mysqli.php (modified) (1 diff)
-
Database/Pdosqlite.php (modified) (3 diffs)
-
Database/Pgsql.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/drivers/Database.php
r2064 r2193 278 278 public function escape($value) 279 279 { 280 if (!$this->db_config['escape']) 281 return $value; 282 280 283 switch (gettype($value)) 281 284 { -
trunk/system/libraries/drivers/Database/Mssql.php
r2190 r2193 124 124 public function escape_column($column) 125 125 { 126 if (!$this->config['escape']) 127 return $column; 128 126 129 if (strtolower($column) == 'count(*)' OR $column == '*') 127 130 return $column; … … 260 263 public function escape_str($str) 261 264 { 265 if (!$this->config['escape']) 266 return $str; 267 262 268 is_resource($this->link) or $this->connect(); 263 269 //mssql_real_escape_string($str, $this->link); <-- this function doesn't exist -
trunk/system/libraries/drivers/Database/Mysql.php
r2016 r2193 102 102 public function escape_table($table) 103 103 { 104 if (!$this->db_config['escape']) 105 return $table; 106 104 107 if (stripos($table, ' AS ') !== FALSE) 105 108 { … … 118 121 public function escape_column($column) 119 122 { 123 if (!$this->db_config['escape']) 124 return $column; 125 120 126 if (strtolower($column) == 'count(*)' OR $column == '*') 121 127 return $column; … … 247 253 public function escape_str($str) 248 254 { 255 if (!$this->config['escape']) 256 return $str; 257 249 258 is_resource($this->link) or $this->connect(); 250 259 -
trunk/system/libraries/drivers/Database/Mysqli.php
r2171 r2193 100 100 public function escape_str($str) 101 101 { 102 if (!$this->db_config['escape']) 103 return $str; 104 102 105 is_object($this->link) or $this->connect(); 103 106 -
trunk/system/libraries/drivers/Database/Pdosqlite.php
r2164 r2193 82 82 public function escape_table($table) 83 83 { 84 if (!$this->config['escape']) 85 return $table; 86 84 87 return '`'.str_replace('.', '`.`', $table).'`'; 85 88 } … … 87 90 public function escape_column($column) 88 91 { 92 if (!$this->config['escape']) 93 return $column; 94 89 95 if (strtolower($column) == 'count(*)' OR $column == '*') 90 96 return $column; … … 203 209 public function escape_str($str) 204 210 { 211 if (!$this->config['escape']) 212 return $str; 213 205 214 if(function_exists('sqlite_escape_string')) 206 215 { -
trunk/system/libraries/drivers/Database/Pgsql.php
r2185 r2193 88 88 public function escape_table($table) 89 89 { 90 if (!$this->config['escape']) 91 return $table; 92 90 93 return '"'.str_replace('.', '"."', $table).'"'; 91 94 } … … 93 96 public function escape_column($column) 94 97 { 98 if (!$this->config['escape']) 99 return $column; 100 95 101 if (strtolower($column) == 'count(*)' OR $column == '*') 96 102 return $column; … … 214 220 public function escape_str($str) 215 221 { 222 if (!$this->config['escape']) 223 return $str; 224 216 225 is_resource($this->link) or $this->connect(); 217 226
