Dear MySQL masters,

Is there any way to display a random record from a table. If there are no 
direct SQL commands can you pls suggest a logic for doing the same.

Details:
There is a table of 200 records. The user must be able to select a record 
randomly. Once that record is displayed then that record will  not be 
available for the next query. (this I am planning to do with a flag field 
and adding this in the query statement).

SELECT * from $table WHERE flag != 'TRUE';

I am using PHP to retrieve the records. so the PHP function
mysql_fetch_array($query); should retrieve a random record, not a record in 
any particular order (ORDER BY).

If anybody has got any suggestions on this please send it to me.

thanks
Sheni R Meledath
[EMAIL PROTECTED]


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to