ESSAY / NOTE

thinkphp多数据库切换

$gcount = D('posts')->db(1,"giphy")->query("select count(*) from posts");
echo '数据总量='.$gcount[0]['count(*)'];