Changeset 1168 for trunk/system/libraries/drivers/Database_Mysql.php
- Timestamp:
- 11/18/2007 03:13:52 AM (12 months ago)
- Files:
-
- 1 modified
-
trunk/system/libraries/drivers/Database_Mysql.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/libraries/drivers/Database_Mysql.php
r1166 r1168 82 82 public function escape_table($table) 83 83 { 84 return str_replace('.', '`.`', $table);84 return '`'.str_replace('.', '`.`', $table).'`'; 85 85 } 86 86 … … 316 316 } 317 317 318 public function list_fields($table) 319 { 320 $query = mysql_query('DESCRIBE '.$this->escape_table($table), $this->link); 321 322 $fields = array(); 323 while ($row = mysql_fetch_object($query)) 324 { 325 $fields[] = $row->Field; 326 } 327 return $fields; 328 } 329 318 330 public function field_data($table) 319 331 {
