slyte33 Posted March 1, 2010 Share Posted March 1, 2010 I am trying to figure out how I would record the most members online at once. I know how to display how many are online, but keeping a record? All help is much appreciated Thanks, Slyte! Link to comment https://forums.phpfreaks.com/topic/193733-recording-most-members-online-at-once/ Share on other sites More sharing options...
inversesoft123 Posted March 1, 2010 Share Posted March 1, 2010 you can create table settings row 1 id name value 1 $maxmemonline=mysql_fetch_array(mysql_query("SELECT value FROM pf_settings WHERE id='1'")); $result = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM pf_online")); if($result[0]>=$maxmemonline[0]) { $tnow = date("D d M Y - H:i"); mysql_query("UPDATE pf_settings set name='".$tnow."', value='".$result[0]."' WHERE id='1'"); } This will give output row 1 id name value 1 Wed 05 Feb 2010 - 22:01 228 Link to comment https://forums.phpfreaks.com/topic/193733-recording-most-members-online-at-once/#findComment-1019740 Share on other sites More sharing options...
slyte33 Posted March 1, 2010 Author Share Posted March 1, 2010 you can create table settings row 1 id name value 1 $maxmemonline=mysql_fetch_array(mysql_query("SELECT value FROM pf_settings WHERE id='1'")); $result = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM pf_online")); if($result[0]>=$maxmemonline[0]) { $tnow = date("D d M Y - H:i"); mysql_query("UPDATE pf_settings set name='".$tnow."', value='".$result[0]."' WHERE id='1'"); } This will give output row 1 id name value 1 Wed 05 Feb 2010 - 22:01 228 That's how I thought it might work, thanks! Link to comment https://forums.phpfreaks.com/topic/193733-recording-most-members-online-at-once/#findComment-1019955 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.