thinkphp join 表前缀

    public function get_user_group_title($uid){
        $pre = C('DB_PREFIX');
        $res = M('AuthGroupAccess aga')->join("{$pre}auth_group ag on aga.group_id = ag.id")
            ->field('ag.title')->find();
        return $res['title'];
    }

  

posted @ 2017-07-13 15:33  捕蛇者说  阅读(1882)  评论(0编辑  收藏  举报