ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
1.buy为数组 ~~~ $group=Db::table('tuan_group')->where('group_id',1)->json(['buy'])->find(); ~~~ 2.buy为json ~~~ $group=Db::table('tuan_group')->alias('a')->leftJoin('tuan_goods b','a.goods_id=b.goods_id')->where('a.group_id',$group_id)-> field('b.goods_id,b.goods_cover,b.goods_name,b.goods_group_price,b.goods_group_num,b.genre,a.buy,a.create_time,a.colonel_id')->json(['a.buy'])->find(); ~~~ 3.buy为json ~~~ $group=Db::table('tuan_colonel_user')->alias('a')->leftJoin('tuan_group b','a.colonel_id=b.colonel_id')->leftJoin('tuan_home_user c','a.unionid=c.unionid')-> where('b.goods_id',$goods_id)->where('b.group_state','<=',2)->json(['b.buy'])->field('b.group_id,b.colonel_id,c.headimgurl,b.create_time,b.goods_group_num,b.buy')->select(); ~~~ 4.buy为数组 ~~~ $group=Db::table('tuan_group')->json(['buy'])->select(); ~~~ 5.buy为json ~~~ $data=Db::table('tuan_group')->where('group_id',1)->json(['buy'])->value('buy'); ~~~