<?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 ); |
} |
?> |