thnx a lot m8!!!! works fine this one is better for me with a litle modification... ;)
// Recommended torrents images
// Edited by YoungKostov
begin_frame("Recommended torrents");
$news = mysql_query("SELECT id, name, added, image1, image2 FROM torrents WHERE banned ='no' AND visible='yes' AND torrents.recommended='yes' ORDER BY torrents.id DESC LIMIT 50" ); ///limit number of images
if (mysql_num_rows($news) > 0) {
print("<marquee direction=right onMouseOver=stop(); onMouseOut=start();><table align=center cellpadding=0 cellspacing=0 width=100% border=0><tr>");
while ($row2 = mysql_fetch_array($news, MYSQL_NUM)) {
$tor = $row2['0'];
$altname = $row2['1'];
$where = "WHERE banned = 'no' AND visible='yes' AND torrents.id='$tor'";
$res = mysql_query("SELECT torrents.id, torrents.image1, torrents.image2, torrents.added, categories.name AS cat_name FROM torrents LEFT JOIN categories ON torrents.category = categories.id $where $orderby $limit");
$row = mysql_fetch_array($res);
$cat = $row['cat_name'];
$img1 = "<a href='{$site_config[sITEURL]}/torrents-details.php?id=$row[id]'><img border='0'
src='uploads/images/{$row[image1]}' alt=\"$altname / $cat\" width=130 height=140></a>";
if ($row["image1"] != ""){
print("<td align=center>". $img1 ."</td><td> </td>");
}
}
print("</tr></table></marquee>");
}
end_frame();