Parašė Apocal· 2009 Spa. 29 16:10:27
#11
Follow parašė:
openside("Atsitiktiniai 10 siuntinių");
$result=dbquery("SELECT * FROM ".DB_PREFIX."downloads ORDER BY RAND() LIMIT 10");
if(dbrows($result)!=0){
while($data=dbarray($result)){
$result2 = dbquery("SELECT download_cat_name FROM ".DB_PREFIX."download_cats WHERE download_cat_id='$data[download_cat]'");
$category = dbresult($result2,0);
echo "<taašr><td class='small2'><a href='".BASEDIR."downloads.php?cat_id=$data[download_cats]&download_id=$data[download_id]' target='blank'
class='slink'>".trimlink($data[download_title], 25)." [$data[download_cat]]></a></td></tr></table>\n";
}
}
closeside();
EDIT. ;)
NEVEIKIA
Jei redaguoji, tai paziurek, kad veiktu, ir susizinok kas nurodo kategorijos pavadinima, o ne id. (downlaods_cat_name) c|FAIL.