Hello,
And if I want to show only one sort of category, what can I change?
for example, imagine my category movie is id=3, and I want only show this category as recommended, what can I change please?(in the lines below)
Quote:/// Recommended torrents imagesbegin_frame("Recommended");
$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 6"); ///limit number of images
if (mysql_num_rows($news) > 0) {
print("<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=90></a>";
if ($row["image1"] != ""){
print("<td align=center>". $img1 ."<BR></td><td> </td>");
}
}
print("</tr></table>");
}
end_frame();
/// end recommended torrent images
Thanx in advance