復制代碼 代碼如下:
<?php
function __construct()
{
parent::__construct();
$this->xx = $this->load->database('XX', TRUE);
$this->load->model('默認庫表名');
}
function index()
{
//現在可以用$this->xx->query()來執行XX庫的sql了
$this->xx->query($sql);
}
?>
新聞熱點
疑難解答