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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.