1. Hope result:
[
{
"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"
},
},
],
there are tables: article and user
2. Get the desired results by associating the user query. How to write the sql query statement? (note: instead of assembling the query results through foreach, it needs to be done through a sql)