Parašė Irmantas2· 2007 Spa. 3 19:10:54
#1
Kaip padryti jog rodytu tik viena NEWS kategorija, o ne visas.
opentable;
if (!isset($readmore)) {
$uzklausa = "SELECT news_cat_id, news_cat_name FROM ".$db_prefix."news_cats";
$rezas = mysql_query($uzklausa)
or die ("Klaidos");
if (mysql_num_rows($rezas) > 0) {
while($nu = mysql_fetch_object($rezas)) {
$uzklausa = "SELECT news_id, news_cat, news_breaks, news_extended, news_subject, news_cat, news_news, news_datestamp,
news_reads FROM ".$db_prefix."news
WHERE news_cat = '50' ORDER BY news_datestamp DESC LIMIT 0,1";
$rezas2 = mysql_query($uzklausa) or die ("Klaida");
if (mysql_num_rows($rezas2) > 0) {
while($nu2 = mysql_fetch_object($rezas2)) {
$komentarai = dbcount("(comment_id)", "comments", "comment_type='N' AND comment_item_id='50' ");
echo " <div class='frontmodule'> $nu->news_cat_name "ka reika irasyti, jog cia rodytu mano pasirinktos kategorijos pavadinima"</div>\n";
if ($nu2->news_breaks == "y") { $news_news = nl2br($nu2->news_news); }
echo stripslashes($news_news);
}
}
}
}
}
closeside;
--------------------------------------------------------------------------------------------
kaip padaryti jog rodytu tik viena kategorija? O ne visas kiek as turiu ju prisidres?
--------------------------------------------------------------------------------------------
RAMon: DUOBLE POST.
Redagavo Irmantas2· 2007 Spa. 3 20:10:04