Jump to content

Archived

This topic is now archived and is closed to further replies.

redarrow

[solved]mixed information shown

Recommended Posts

Hi there all hopes all ok can you kindly show me how to show from a mysql database how to mix all the entrys up and show them all in mixed view .

example if you had a database called members and you wanted to show all members but all shown as mixed and jumbled up cheers.

Share this post


Link to post
Share on other sites
This will output names in random order

[code]<?php

$sql = "SELECT membername FROM members
        ORDER BY RAND()";
$result = mtsql_query ($sql) or die (mysql_error() );
while ($row = mysql_fetch_assoc($result)) {

        echo $row['membername'] , '<br>';
}
?>[/code]

Share this post


Link to post
Share on other sites

×

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.