Jump to content

Can I get a random row. with mySQL


mazman13

Recommended Posts

Ok, I have a script that picks a random number based on the number of banners in my database.

The number is used to pick a rank number in the banners.

example: random number 1, so it picked picture.jpg (rank no. 1) from the database and plays it.

Is there a way, to just have it pick a row number.

example: SELECT * FROM database WHERE COL NUMBER IS (random number from script)

cuz the way i have it now, if i erase a banner now, the image rank is erased, so some banners might now be picked. can i get info from a row number? i hope people can understand what i'm saying...

ask questions if you don't understand...i havn't slept much this week.
Link to comment
https://forums.phpfreaks.com/topic/20802-can-i-get-a-random-row-with-mysql/
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.