Parašė zDon· 2009 Lie. 31 14:07:24
#6
openside("Naujienos");;
$result = dbquery("SELECT * FROM ".$db_prefix."news WHERE news_cat= '1' ORDER BY news_id");
$rows = dbrows($result);
if ($rows != 0) {
$counter = 0; $columns = 2;
while ($data = dbarray($result)) {
if ($counter != 0 && ($counter % $columns == 0)) echo "";
echo "
<table width='100%'>
<td width='90%'><a href='".BASEDIR."news.php?readmore=".$data['news_id']."'>".$data['news_subject']."</a> </td></table>";
$counter++;
}
echo "";
} else {
echo "<center><br>Naujienų nėra<br><br></center>\n";
}
closeside();