URGENT HELP NEEDED!
Sorry for the cross posting...
hey guys... Here we go again... Need some PHP Aid...
I'm trying to make a users online system... I have been able to count the users online system with this code:
$sql = "select count(distinct IP) from AccessLog where TimeE > NOW() - 300 ";
$ol = $this->DoQuery($sql);
$ol = $ol[0][0];
if($ol==1)
{
echo "$ol Screaming, In The Dark";
}
else
{
echo "$ol Sharing Their Screams";
}
But now I want to move on to online.php
Here's what I need to do...
Select UNIQUE (distinct) IP from the accesslog db table within the last five minutes... this isn't hard... Something like
SELECT distinct IP FROM AccessLog WHERE TimeE > NOW() - 300
However, I need to pull several other columns from the same row of the distint IP within the last five minutes... ReferPage, ReferGetLine, OnPage, OnGetLine... I could do...
SELECT distinct IP, ReferPage, ReferGetLine, OnPage, OnGetLine FROM AccessLog WHERE TimeE > NOW() - 300
but that would mean mutiple rows with the same data...
Any thoughts?
-Shade
hey guys... Here we go again... Need some PHP Aid...
I'm trying to make a users online system... I have been able to count the users online system with this code:
$sql = "select count(distinct IP) from AccessLog where TimeE > NOW() - 300 ";
$ol = $this->DoQuery($sql);
$ol = $ol[0][0];
if($ol==1)
{
echo "$ol Screaming, In The Dark";
}
else
{
echo "$ol Sharing Their Screams";
}
But now I want to move on to online.php
Here's what I need to do...
Select UNIQUE (distinct) IP from the accesslog db table within the last five minutes... this isn't hard... Something like
SELECT distinct IP FROM AccessLog WHERE TimeE > NOW() - 300
However, I need to pull several other columns from the same row of the distint IP within the last five minutes... ReferPage, ReferGetLine, OnPage, OnGetLine... I could do...
SELECT distinct IP, ReferPage, ReferGetLine, OnPage, OnGetLine FROM AccessLog WHERE TimeE > NOW() - 300
but that would mean mutiple rows with the same data...
Any thoughts?
-Shade
