hallo leude,
ich möchte das mein Block-Neueste-downloads neben dem titel auch die entsprechende kategorie anzeigt. wie muss ich den code ändern hier ??
// Title of New Downloads section
$titlenewdownloads = "Die letzen 10 Downloads";
if (eregi("block-Download_Links.php", $_SERVER['PHP_SELF'])) {
Header("Location: index.php");
die();
}
global $prefix, $dbi;
$content="";
$content .= "<hr noshade size=\"1\" color=\"#eeeeee\">";
$content.="<table border=\"0\" cellspacing=\"0\" cellpadding=\"5\" align=\"center\" width=\"100%\" bgcolor=\"#eaeaea\"><tr><td valign=\"top\" width=\"49%\">";
$content .= "<font color=\"#FF0000\"><b>$titlenewdownloads:</b></font><br>";
$a = 1;
$result = sql_query("select lid, cid, title, hits from ".$prefix."_downloads_downloads order by date DESC limit 0,10", $dbi);
while(list($lid, $cid, $title, $hits) = sql_fetch_row($result, $dbi)) {
$title2 = ereg_replace("_", " ", $title);
if(strlen($title) > 27) {
$title2 = substr($title,0,100);
$title2 .= "..";
}
$content .= "<font color=\"#FF0000\">$a: <a href=\"modules.php?name=Downloads&d_op=viewdownloaddetails&lid=$lid&ttitle=$utitle\">$title2</a> <em>($hits hits)</em></font><br>";
$a++;
}
$content.="</td></tr></table>";
da die kategorie titel in einer anderen sqltabelle ist müsste man eigentlich zwei mal gleichzeitig von der datenbank lesen. doch wie geht das??
bitte help!