How do i make a randomly changing list?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Seraphimk
Forum Newbie
Posts: 22
Joined: Mon Feb 09, 2009 12:49 pm

How do i make a randomly changing list?

Post by Seraphimk »

I am creating a proxy advertising site and i want to create a table that has a list of proxies were there order randomly changes automatically every 10 min does anyone know how to do this or somewhere were i can find the script or somewhere which tells me how to do it ?
sujithtomy
Forum Commoner
Posts: 46
Joined: Tue Mar 24, 2009 4:43 am

Re: How do i make a randomly changing list?

Post by sujithtomy »

Hello,

if you are using mysql to store data,

you could usequery like this

Code: Select all

SELECT * FROM table ORDER BY rand()
ORDER BY rand() will do it for you
Post Reply