Jump to content

How to use RAND()


manalnor

Recommended Posts

Hello dear friends,

 

I know that i can write it for MYSQL database as

 

$qry="select names from tools order by RAND()";
$result=mysql_query($qry) or die($qry);

 

My question

 

how can i may it random in certain range for example show 4 " names" in random way in range of "1" to "10" order by id ? to to write it

 

in another way i ask about random "RAND()" in certain range How !

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/244695-how-to-use-rand/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.