如何获取随机的用户名称。
SELECT a.mod_name, u.user_name, a.id from type a, users u
WHERE a.id=u.mod_type
ORDER BY mod_type Desc ";
SELECT a.mod_name, u.user_name, a.id from type a, users u
WHERE a.id=u.mod_type
ORDER BY mod_type Desc ";
ORDER BY RAND()
来实现这一点:SELECT a.mod_name, u.user_name, a.id
FROM type a, users u
WHERE a.id=u.mod_type
ORDER BY RAND()
关于什么?
编辑:
select a.mod_name, u.user_name, a.id from type a, users u where a.id=u.mod_type
order by mod_type DESC, rand();
?
RAND()
函数。 select a.mod_name, u.user_name, a.id from type a,
users u where a.id=u.mod_type
order by RAND(),mod_type Desc ";