Ja, nu heb ik ook een vraag
Ik heb dit script:
Maar op een een of andere rare manier werkt het niet.
In de tabel users staat een kolom time en een kolom date
Hoe kan ik nu aangeven wie er online was de laatste 5 minuten?
Ohja de tijd wordt al in de db gezet.
M.V.G Mitchel
Ik heb dit script:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]../_include.php[/COLOR][COLOR= #007700]);[/COLOR]
design_boven[COLOR= #007700]([/COLOR][COLOR= #DD0000]Leden Lijst[/COLOR][COLOR= #007700]);[/COLOR]
check_login[COLOR= #007700]();[/COLOR]
?>
<h2>Leden Lijst</h2>
<table width="100%">
<tr><td><strong>Naam</strong></td><td><strong>Punten</strong></td><td><strong>Uitbetaald cr.</strong></td><td><strong>Uitbetaald €</strong></td><td width="50"><strong>Online</strong></td></tr>
[COLOR= #0000BB]<?
$top2[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM `users` WHERE level = 1 ORDER BY kliks DESC"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$top1[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top2[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top1[/COLOR][COLOR= #007700])){[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$top[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]time[/COLOR][COLOR= #007700]] +[/COLOR] [COLOR= #0000BB]300[/COLOR] [COLOR= #007700]<[/COLOR] [URL="http://www.php.net/time"]time[/URL][COLOR= #007700]()){[/COLOR]
[COLOR= #0000BB]$actief[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]<strong><font color="red">Nee</font></strong>[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$actief[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]<strong><font color="green">Ja</font></strong>[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<tr><td>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$top[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</td><td>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$top[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]kliks[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</td><td>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$top[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uitbetaald[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</td><td>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$top[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uitbetaald2[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000] cent</td><td>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$actief[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]</td></tr>[/COLOR][COLOR= #007700];
}[/COLOR]
?>
</table>
[COLOR= #0000BB]<?[/COLOR]
design_onder[COLOR= #007700]([/COLOR][COLOR= #DD0000]1[/COLOR][COLOR= #007700]);[/COLOR]
?> Maar op een een of andere rare manier werkt het niet.
In de tabel users staat een kolom time en een kolom date
Hoe kan ik nu aangeven wie er online was de laatste 5 minuten?
Ohja de tijd wordt al in de db gezet.
M.V.G Mitchel

