数据库 多连接

浏览:731 发布日期:2013/11/07 分类:求助交流 关键字: 多连接 数据库
##########config#################
'DB_CONFIG1' => array(
            'db_type'  => 'mysql',
            'db_user'  => 'root',
            'db_pwd'   => '1234',
            'db_host'  => 'localhost',
            'db_port'  => '3306',
            'db_name'  => 'thinkphp'
    ),
#########AccountModel###############
protected $connection = 'DB_CONFIG1';
###########控制器##############
$User = M('Account','tb_','DB_CONFIG1');
这样 有什么 问题吗?我为什么找不到数据库
SELECT * FROM `tb_account`
最佳答案
评论( 相关
后面还有条评论,点击查看>>