Jump to content

Recording most members online at once


slyte33

Recommended Posts

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

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!

 

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.