PHP קוד:
<?php
mysql_connect('localhost', '******', '******');
mysql_select_db('******');
$r = mysql_query("SELECT t.id, t.topic_title
FROM ibf_posts p, ibf_topics t, ibf_forums f
WHERE f.auth LIKE '0%' AND t.forum_id = f.id AND p.id = t.last_post_id
ORDER BY p.post_time DESC LIMIT 10");
if (@mysql_num_rows ($r) == 0)
echo "אין תוצאות";
else {
echo '<ul>';
while ( $out = mysql_fetch_array($r) ) {
echo '<li><a href="index.php?showtopic='.$out['id'].'">';
echo htmlspecialchars($out['topic_title']).'</a></li>';
}
echo '</ul>';
}
?>