Newbie needs help with query

Hi,

Is there a query which will select x random unique records out of all records
and sort them randomly, but if all records is smaller than x then it chooses
all the records and sorts them randomly.

e.g choose 3 random unique records out of all records (20) and sort them
randomly (5,1,14) , but if there are only 2 records it chooses the 2 records
and sorts them randomly (2,1).

Thank you in advance,

Raj (Newbie)
raj [ Di, 06 März 2007 08:54 ] [ ID #1649288 ]
PHP » alt.php.sql » Newbie needs help with query

Vorheriges Thema: NULL fields in table - efficiency question
Nächstes Thema: Regular expression in MySQL (need to strip number fiel of spaces and then match).