Hi,
I've got a mysql table that stores users who are online by way of putting a current time into a time field.
my db query below selects the minute of the lastpost time and the minute of the current time.
what I want to do is make an if statement that asks:
"if $cur_time is greater than $time by ten minutes delete entry"
if($cur_time > $time ?????by 10 minutes?????)
{
// delete entry
}
how do I ask that in correct form????
please help!!!
$result = mysql_query("SELECT username, minute(lastpost), minute(curtime()) FROM online order by username asc");
while($query_data = mysql_fetch_row($result))
{
$users = $query_data[0];
$users = parsemessage($users);
$time = $query_data[1];
$cur_time = $query_data[2];
echo "<font face='Arial,Helvetica' size='3' color='#FFFFFF'>$users, $time<br>";
}