Jump to content

[SOLVED] Dont Extract TIMESTAMP -5 Minutes


Daney11

Recommended Posts

Hey Guys,

 

Having trouble with my who's online script. Basically i want to echo out users who have been online within the last 5 minutes from my database, but no echo out people who havent been online in the last 5 minutes...

 

My code is..

 

<?php

$inactive = time()-(60*60*5);

$strQuery = "SELECT * FROM managers WHERE manager_time > $inactive ORDER BY manager_time DESC";
$result = mysql_query($strQuery,$db) or die(mysql_error());

while ($myrow = mysql_fetch_array($result))

{

?>

<td width="100"><?php echo stripslashes(date('H:i:s', $myrow['manager_time'])); ?></td>

<?php

}

?>

However, this gets all managers out of the database reguardless of what time they have been online... Any ideas guys..

 

Thanks

 

Dane

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.