Jump to content

[SOLVED] random query


web_master

Recommended Posts

Hi,

 

I want to list users, but randomly on every pageload and only 9 users, how can I do that?

 

<?php 
// Reload from dBase
$QueryReturn = mysql_query( 'SELECT * FROM `user` WHERE `user_onoff` = "1" AND `user_delete` = "0" ' );

// Check query
if ( !$QueryReturn ) { echo mysql_error(); exit; }

// Request query
while ( $REQUEST = mysql_fetch_array ( $QueryReturn ) ) {
$REQUEST['user_nick'];
}
?>

 

Thanks in advanced

 

T

Link to comment
https://forums.phpfreaks.com/topic/181852-solved-random-query/
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.