Hallo...
Ich habe ein kleines script mit dem ich aus der DB die letzten aktiven threads von einem Forum ausgebe. Das funktioniert auch wunderbar. Nun frage ich mich, wie ich den neuesten Thread für 24h farblich hervorheben kann?
PHP-Code:
<table align="center" border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<th width="100% " background="self_template/tab_bg_forum.jpg">
<div align="right">|<br>
|</div>
</th>
</tr>
</table>
<table align="center" border="0" cellspacing="0" cellpadding="0" width="100%">
<?php
//Verbindung herstellen
$db = mysql_connect("localhost","***","***");
mysql_select_db("***",$db);
//Daten auslesen
$result = mysql_query("select forumthread_id,forumthread_title,forumthread_icon,forumthread_autor,forumthread_viewcount,forumthread_lastreply_autor,forumthread_lastreply_time,forumthread_replycount from jo_forumthread order by forumthread_lastreply_time DESC LIMIT 5");
echo mysql_error();
while ($daten = mysql_fetch_array($result)) {
echo'
<tr class="feld">
<td width="10%" bgcolor="#777777"> '.date('d.m.Y', $daten[forumthread_lastreply_time]).'</td>
<td width="18%" bgcolor="#777777"><b>Tittel:</b><a href="include.php?path=forum/showthread.php&threadid='.$daten[forumthread_id].'"style="text-decoration:none"> '.$daten[forumthread_title].'</a></td>
<td width="12%" bgcolor="#777777"><b>Antworten: </b>'.$daten[forumthread_replycount].'</td>
<td width="10%" bgcolor="#777777"><b>Aufrufe: </b>'.$daten[forumthread_viewcount].'</td>
<td width="15%" bgcolor="#777777"><b>Autor: </b>'.$daten[forumthread_autor].'</td>
<td width="22%" bgcolor="#777777"><b>Letzter Beitrag: </b>'.$daten[forumthread_lastreply_autor].'</td>
';
};
?>
</tr></table><hr>
mfg bodo