Biliyorum konu başlığı biraz garip oldu.. Şöyle anlatayım ;
Bu koddaki veri boş ise "Kayıtlı Haber Yok" demesini istiyorum if döngüsü ile yapmaya calıstım ama olmadı yapabilecek olan arkadaş var mı?
<?php
include ('config.php');
$veri = odbc_exec($conn,"select TOP 5 * from _ARTICLES ORDER BY id DESC");
while (odbc_fetch_row($veri)) {
$id = odbc_result($veri, 1);
$title = odbc_result($veri, 2);
$articles = odbc_result($veri, 3);
$date = odbc_result($veri, 4);
$views = odbc_result($veri, 5);
$type = odbc_result($veri, 6);
if ($type == '0') {
$tur = 'Genel';
}
elseif ($type == '1') {
$tur = 'Oyun Haberi';
}
elseif ($type == '2') {
$tur = 'Web Haberi';
}
elseif ($type == '3') {
$tur = 'Sunucu Haberi';
}
echo'<p>
<ul>
<li><a href="index.php?sayfa=articles&id='.$id.'">'.$title.'</a> - <font color="#ffcc00">'.$tur.'</font> - '.$date.'</li>
</ul>
</p>';
}
?>