示例#1
0
 public function __construct($name, $db = 'default')
 {
     $this->_name = $name;
     $this->_db = Hi_Db::get($db);
     $this->info();
     $this->_condition = new Hi_Db_Table_Condition($this);
 }
示例#2
0
 public function __construct($table, $id = null, $db = 'default')
 {
     if ($db instanceof Hi_Db_Adapter_Abstract) {
         $this->_db = $db;
     } else {
         $this->_db = Hi_Db::get($db);
     }
     if ($table instanceof Hi_Db_Table) {
         $this->_table = $table;
     } else {
         $this->_table = new Hi_Db_Table($table, $db);
     }
     $this->_primaryKey = $this->_table->getPrimaryKey();
     if ($id !== null) {
         $this->setId($id);
     }
 }
示例#3
0
 public function getConnection()
 {
     $db = Hi_Db::get();
     $pdo = $db->getConnection();
     var_dump($pdo);
 }
示例#4
0
 public function __construct()
 {
     $this->_db = Hi_Db::get();
     $this->_scws = scws_open();
     scws_add_dict($this->_scws, 'D:\\www\\jubanr_bak\\scws-db\\dict.utf8.xdb', SCWS_XDICT_XDB);
 }