Witam.
Piszę prosty skrypt forum i od jakiegoś czasu nie mogę wymyślić, jak zrobić wyświetlanie ostatniego posta na stronie głównej.
Tzn. linku do niego + nazwa.
Wygląda to na razie tak:
<?php
?>
<br />
<div class="forums">
<table width="92%" border="0" align="center" cellpadding="3" cellspacing="1">
</table>
<table class="thead" width="92%" border="0" align="center" cellpadding="5" cellspacing="1">
<tr>
<td width="10%" align="center"><strong>Icon</strong></td>
<td width="65%" align="center"><strong>Forum</strong></td>
<td width="25%" align="center"><strong>Last post</strong></td>
</tr>
<tr>
<td align="center" class="row"><img src="images/icons/post.png" border="0" /></td>
<td class="row"><a href="forum.php">Forum</a><br /></td>
<td class="row">
<? echo $rows['datetime']; ?><br /><a href="thread.php?id=
<? echo $rows['id']; ?>">
<? echo $rows['topic']; ?></a><br /></td>
</tr>
<tr>
<td colspan="5" valign="bottom" align="right" bgcolor="#E6E6E6"><img src="images/icons/admin.png" border="0" /> <a href="admin/index.php">Administrative Control Panel</a></td>
</tr>
</table>
<?php
}
?>
No i niestety zaczyna mi wyświetlać wszystkie tematy, a chcę tylko ostatni.
Tabela tematów - forum_question.php
Proszę o pomoc.