Random retrieveal from database

How can i choose some "n" (n is gonna be fixed )records randomly from a
mysql database table from our controller?

Subashini Kumar wrote:

How can i choose some "n" (n is gonna be fixed )records randomly from a
mysql database table from our controller?

Use RAND() function in mysql query...
select * from TABLE_NAME order by RAND() limit N

Brijesh Shah wrote:

Subashini Kumar wrote:

How can i choose some "n" (n is gonna be fixed )records randomly from a
mysql database table from our controller?

Use RAND() function in mysql query...
select * from TABLE_NAME order by RAND() limit N

Yeah !! cool!!! thanks a lot!!!