0
I以下の4つの選択があります。 MySQLの+ヘルプ作成UNIONクエリ
select english,type from table where type='brief' ORDER BY RAND() LIMIT 5;
select english,type from table where type='small' ORDER BY RAND() LIMIT 5;
select english,type from table where type='medium' ORDER BY RAND() LIMIT 5;
select english,type from table where type='large';
はむしろ、私はむしろ1 UNIONとしてこれを実行します複数のクエリを作る - すべて同じ形式になってからも出力を見て。
私は以下を試しましたが、RAND()は動作していません。そこ種類ごとに約10のオプションがありますが、私は同じ5いうし、ランダムなリターンを見続ける:
select english,type from table where type='brief' LIMIT 5
UNION
select english,type from table where type='small' LIMIT 5
UNION
select english,type from table where type='medium' LIMIT 5
UNION
select english,type from table where type='large' ORDER BY type,RAND();
真のランダムリターンでこのUNIONを実行する方法上の任意のアドバイスを? THX