Parašė avice· 2011 Sau. 29 14:01:08
#251
opentable("Paskutines Naujienos");
$limitas = 5;
$result = dbquery("SELECT * FROM ".DB_PREFIX."news ORDER BY news_datestamp DESC LIMIT 0,$limitas");
if (dbrows($result)) {
while ($data = dbarray($result)) {
echo "<table width='706' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td width='127'>".date("o.m.d",$data['news_datestamp'])."</td>
<td width='579'><a href='".BASEDIR."news.php?readmore=".$data['news_id']."'>".$data['news_subject']."</a></td>
</tr>
</table>\n";
}
} else {
echo "<center>Naujienu nėra</center>\n";
}
closetable();
persidaryk lentele , nes betkaip padariau