1、希望结果:
[ { "created_at": "Wed Jun 01 00:50:25 +0800 2011", "id": 12438492184, "name": "love your work.......", "user": { "id": 1404376560, "name": "zaku", "url": "http://blog.ceshi.com.cn/zaku" }, }, { "created_at": "Wed Jun 01 00:50:25 +0800 2011", "id": 12438492185, "name": "love your work.......", "user": { "id": 1404376561, "name": "测试", "url": "http://blog.ceshi.com.cn/zaku" }, }, ],
有表:article和user
2、通过关联user表查询得到希望结果,sql查询语句怎么写?(注:不是将查询结果再通过foreach组装得到,要求通过一条sql就搞定)
喵喵时光机
相关分类