Parašė _Tomas· 2009 Lap. 19 01:11:42
#1
opentablenw("");
echo "<table cellpadding='0' cellspacing='0' width='750'><tr>
<td width='150' class=tbl1 >Pavadinimas</td><td class=tbl1 width=60 >Komentarai</td><td class=tbl1 width=60 >Skaityta</td></tr>";
$result2 = dbquery("SELECT * FROM ".$db_prefix."news ORDER BY news_datestamp DESC LIMIT 20");
while ($data2 = dbarray($result2)) {
$result = dbquery("SELECT * FROM ".$db_prefix."news_cats WHERE news_cat_id='".$data2['news_cat']."' ");
$data = dbarray($result);
echo "<tr><td class=tbl1><img src='".THEME."images/bullet.gif' alt=''> ".$data['news_cat_name'].": <a href='news.php?readmore=".$data2['news_id']."'>".$data2['news_subject']."</a><br></td><td class=tbl1> ".$data2['news_comments']."</td><td class=tbl1> ".$data2['news_reads']."</td></tr>";
}
echo "</table>";
closetablenw();
Naujausių naujienų panelė. Kažkodėl nenori atvaizduoti news_comments... Bandžiau su dbcount, bet neišeina.
Any Ideas?