Jump to content

MYSQL ARRAY HELP PLEASE


Orionsbelter

Recommended Posts

Ok, so i'm wanting to randomly select one user from the table users, however this user has to be online.

like this,

$time=time();
mysql_query("SELECT username, id FROM users WHERE online > $time");

 

The way i was going to do it is, i was going to put all the user IDs into an array and randomly pick one, but if you know a better way please do tell me.

 

I would like to know how i can put all the user ID into an array, from that string as i only know how to array PHP and not mysql strings.

Thank You

 

Link to comment
https://forums.phpfreaks.com/topic/171395-mysql-array-help-please/
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.