How to fetch RANDOM User_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 ";
How to fetch RANDOM User_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 ";
You can use ORDER BY RAND() for that:
SELECT a.mod_name, u.user_name, a.id
FROM type a, users u
WHERE a.id=u.mod_type
ORDER BY RAND()
What about
EDIT:
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();
?
order by mod_type DESC, rand() Mysql supports RAND() function
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 ";