Jump to content

a code to display random results...


blueman378

Recommended Posts

hi guys i am making a games website and i need a code to for the WHERE part of the mysql query it selects a random value from a column called gname

 

so basically i want a code to read the info from gname, and select one at random, or sequential, is this possible? thanks :)

 

PS: im not asking for a complete code just some pointers to the right functions ect

 

thanks people

Link to comment
https://forums.phpfreaks.com/topic/81949-a-code-to-display-random-results/
Share on other sites

the id colum, so for example i have ids between 1-20, rand can generate large numbers so would i have a while  mysql affected rows = 0 rerun the query?

else run my code with the generated results?

 

how would i go about this?

 

thanks

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.