$result = mysql_query("SELECT id, virsraksts, raksts, laiks, komentaru_skaits, admins FROM jaunumi ORDER BY id DESC LIMIT 5");
while($row = mysql_fetch_array($result, MYSQL_NUM))
{
$r = mysql_query("SELECT id from lietotaji WHERE lietotajvards = '$row[5]'");
while($admin = mysql_fetch_array($r, MYSQL_NUM))
{
echo "
<div class='jaunumi_virsraksts'>
<h1><img class='raksts' src='http://www.mindtime.lv/nhl/das/dizains/raksts.gif' alt='' />
<span class='virsraksts'>$row[1]</span>
</h1>
</div>
<span class='pievienots'>Autors: <a href='lietotajs.php?id=$admin[0]'>$row[5]</a>, ".date("d.m.Y",$row[3])."</span>
<p class=\"raksts\">$row[2]</p>
<span class='komentari'>
<img src='http://www.mindtime.lv/nhl/das/dizains/komentari.gif' alt='' />
<a href=\"komentaari.php?raksta_id=$row[0]\" style='text-align: right;' >Komentāri ($row[4])</a>
</span>
";
}
}
while iekšs while. Viss strādā.