In my Database(mysql) i have 100 members registered,Now there is page i want to display only ten members, but after each page refresh i want other ten members to display at the very same place Meaning replacing the current shown members.
Any one with the idea on how i can Do this i will appreciate.
thankx

Recommended Answers

All 2 Replies

This is fairly simple, use the RAND function in the SQL query:

$sql = "SELECT * FROM tablename WHERE somefield='something' ORDER BY RAND() LIMIT 10";
commented: Nice Answer.... +2

Thank You Very much Xan,your idea worked.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.