Esempio n. 1
0
 /**
  * 获取数据库连接
  * @param string $type
  * @return PDO
  */
 public function connect($type = 'w')
 {
     if ($this->db) {
         $db = $this->db;
     }
     $this->_dbh = FDB::connect($db, $type);
     return $this->_dbh;
 }
Esempio n. 2
0
 public function connect($rw_type = 'w')
 {
     if ($this->db_conf) {
         $rw_type = $this->db_conf;
     }
     $this->_dbh = FDB::connect($rw_type);
     return $this->_dbh;
 }
Esempio n. 3
0
 /**
  * 构建数据操作实例
  *
  * @param string $table
  *
  * @internal param array
  */
 public function __construct($table)
 {
     global $_F;
     $this->_dbh = FDB::connect();
     $this->_table = $_F['db']['config']['table_pre'] . $table;
 }