Is it possible?
I am implementing a tag coud...I have 2000 records alphabetically sorted (and various other ways) but I only want to show 10 or 100 at a time. Obviously using a LIMIT will not work cause I want the output to be random, not alphabetically ordered.
Ideally there is a random aggregate function or something which can jumble my results and I can thus use LIMIT to display only a few.
Make sense? Possible?
Slect 1000 rows but only show random 100?
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Slect 1000 rows but only show random 100?
[sql]SELECT *FROM mytableORDER BY rand()LIMIT 100[/sql]
There are 10 types of people in this world, those who understand binary and those who don't
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
Re: Slect 1000 rows but only show random 100?
How did I miss that
Thanks again
Thanks again