SELECT uid,COUNT(dlcname) 'T' FROM (
SELECT dlcname,uid FROM dlc GROUP BY dlcname,uid
) a GROUP BY uid
) b
1)随机取出5条记录用sql语句就行了mysql如下:"select
*
from
youtable
order
by
rand()
limit
5"
2)同样随机取5-10条:
$num=rand(5,10)
$sql="select
*
from
youtable
order
by
rand()
limit
$num"
ps:为什么不是php分类问题?
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)