NutzCN Logo
问答 select 自定义字段,如何用dao实现?
发布于 3231天前 作者 fangoxyz 1894 次浏览 复制 上一个帖子 下一个帖子
标签:

SELECT t_userdesire.*,(SELECT count(*) from t_viewtelephone where view_userid=(select id from t_user where telephone=t_userdesire.telephone) and view_type=2 and state=1 and identity =0 ) as cntboda,(SELECT count(*) from t_viewtelephone where view_userid=(select id from t_user where telephone=t_userdesire.telephone) and view_type=1 and state=1 and identity =0 ) as cntview FROM t_userdesire ORDER BY cntboda desc LIMIT 0, 30

1 回复
添加回复
请先登陆
回到顶部