访问数据库总超时?这份避坑指南请收好
复制 1select fo.FollowId as vid, count(fo.id) as vcounts
2
3from follow fo, user_info ui
4
5where fo.userid = ui.userid
6
7and fo.CreateTime between
8
9str_to_date(?, %Y-%m-%d %H:%i:%s)
10
11and str_to_date(?, %Y-%m-%d %H:%i:%s)
12
13and fo.IsDel = 0
14
15and ui.UserState = 0
16
17group by vid
18
19order by vcounts desc
20
21limit 0,10
1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.
THE END