Show
Ignore:
Timestamp:
11/18/2007 03:13:52 AM (12 months ago)
Author:
Shadowhand
Message:

Batch of core changes:

  • Added a configuration file for profiler, to enable/disable specific profiler information
  • Implemented configuration handling in Profiler and views/kohana_profiler.php
  • Added system/models/form.php and views/kohana_form.php, see: http://kohanaphp.com/tutorials/quick_forms.html
  • text::random('unique') now uses sha1, instead of md5
  • Added a couple of missing connect() calls in Database
  • Added Database::list_fields() and Database_Mysql::list_fields()
  • Fixed Database_Mysql::escape_table()
  • Changed Loader::helper() to just do a Log::add('debug') instead of actually loading the helper
  • Updated some comment styles to prepare for Kodoc

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/drivers/Database_Mysql.php

    r1166 r1168  
    8282        public function escape_table($table) 
    8383        { 
    84                 return str_replace('.', '`.`', $table); 
     84                return '`'.str_replace('.', '`.`', $table).'`'; 
    8585        } 
    8686 
     
    316316        } 
    317317 
     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 
    318330        public function field_data($table) 
    319331        {