RANDOMUser_namesを取得する方法。
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();
?
Mysqlは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 ";