/** * 获取数据库连接 * @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; }
public function connect($rw_type = 'w') { if ($this->db_conf) { $rw_type = $this->db_conf; } $this->_dbh = FDB::connect($rw_type); return $this->_dbh; }
/** * 构建数据操作实例 * * @param string $table * * @internal param array */ public function __construct($table) { global $_F; $this->_dbh = FDB::connect(); $this->_table = $_F['db']['config']['table_pre'] . $table; }