示例#1
0
文件: DB.php 项目: wiserweb/OpenVBX
 public function __construct($options)
 {
     parent::__construct($options);
     $ci =& get_instance();
     $this->_db = $ci->db;
     if (!$this->_db->table_exists('cache')) {
         // you'll see this error once when upgrading from non-cache enabled builds
         log_message('error', 'Cache table does not exist. Disabling cache.');
         parent::enabled(false);
     }
 }
示例#2
0
 /**
  * Check to see if a table exists
  *
  * @param mixed $Table
  * @return ifx_Model
  */
 private final function _table_exists($Table)
 {
     if (is_a($Table, 'ifx_Model')) {
         $Table = $Table->_table();
     }
     //Could use db->list_tables?
     if (!isset(self::$_existing_tables[$Table])) {
         self::$_existing_tables[$Table] = $this->db->table_exists($Table);
     }
     return self::$_existing_tables[$Table];
 }