
from tb as t1
left join tb as t2 on t2.pid=t1.id and t2.pid=1
left join tb as t3 on t3.pid=t2.id and t3.pid=2
left join tb as t4 on t4.pid=t3.id and t4.pid=3
where pid=0
数据库取出来首先是一个LIST。然后用jsonlib这个包的API转一下就OK了
JSONArray.fromObject(list).toString() 就可以了
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)