How about: SELECT sUser FROM members WHERE sUpdated > NOW() - INTERVAL 10 MINUTE;
as your query... I assume you are using a MySQL format date/datetime/timestamp column for sUpdated? ---John Holmes... > -----Original Message----- > From: Philip J. Newman [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 24, 2002 11:48 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Showing online users! > > The best way to show online users ... > > every page that is loaded while a user is online the time stamp is updated > in there profile > > <? > > $sql = "SELECT sUser FROM members WHERE sUpdated > > from_unixtime(unix_timestamp(now())-(10*60))"; > $sql_result = mysql_query($sql, $connection) or die (mysql_error()); > > while ($row = mysql_fetch_array($sql_result)) { > $sUser=$row["sUser"]; > > echo"<b><a > href=\"/actual/thesite.php?startWeb=profile&sUser=$sUser\">$sUser</a></b >, > "; > > } > > ?> > > Is this the best way to do this? > > --- > Philip J. Newman. > Head Developer. > PhilipNZ.com New Zealand Ltd. > http://www.philipnz.com/ > [EMAIL PROTECTED] > > Mob: +64 (25) 6144012. > Tele: +64 (9) 5769491. > > Family Site: > Philip J. Newman > Internet Developer > http://www.newman.net.nz/ > [EMAIL PROTECTED] > > ***************************** > Friends are like Stars, > You can't always see them, > But you know they are there. > > ***************************** > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php