@opensidex("Latest Downloads", off);
$result=dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,10");
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
if(dbrows($result)!=0){
echo "<tr><td colspan='2' class='small'>(Move the mouse over the link to see a longer title.)</td></tr>";
while($data=dbarray($result)){
echo "<tr>
<td class='small'><a href='".BASEDIR."downloads.php?cat_id=$data[download_cat]&download_id=$data[download_id]'
title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 22)."</a></td>
<td align='right' class='side'>$data[download_count]</td>
</tr>
<tr>
<td class='small'>".$download_cat_name."</td>
</tr>\n";
}
}
echo "</table>\n";
@closesidex();
?>
$result=dbquery("SELECT * FROM ".$db_prefix."downloads ORDER BY download_datestamp DESC LIMIT 0,10");
$cats = dbarray(dbquery("SELECT * FROM ".$db_prefix."download_cats"));
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
if(dbrows($result)!=0){
echo "<tr><td colspan='2' class='small'>(Move the mouse over the link to see a longer title.)</td></tr>";
while($data=dbarray($result)){
echo "<tr>
<td class='small'><a href='".BASEDIR."downloads.php?cat_id=$data[download_cat]&download_id=$data[download_id]' title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 22)."</a></td>
<td align='right' class='side'>$data[download_count]</td>
</tr>
<tr>
<td class='small' colspan='2'>".$cats['download_cat_name']."</td>
</tr>\n";
}
}
echo "</table>\n";
<?php
@opensidex("Latest Downloads", off);
echo "<table width='100%' cellpadding='0' cellspacing='0'>\n";
$result = dbquery("SELECT * FROM ".$db_prefix."downloads d
LEFT JOIN ".DB_PREFIX."download_cats dc ON d.download_cat=download_cat_id
ORDER BY download_datestamp DESC LIMIT 0,10");
if (dbrows($result)) {
echo "<tr><td colspan='2' class='small'>(Move the mouse over the link to see a longer title.)</td></tr>";
while ($data = dbarray($result)) {
echo "<tr>
<td class='small'>
<a href='".BASEDIR."downloads.php?cat_id=".$data['download_cat']."&download_id=".$data['download_id']."' title='".$data['download_title']."' class='side'>".trimlink($data['download_title'], 22)."</a>
</td>
<td align='right' class='side'>".$data['download_count']."</td>
</tr>
<tr>
<td class='small'>".$data['download_cat_name']."</td>
</tr>\n";
}
}
echo "</table>\n";
@closesidex();
?>
Quote
Elactos wrote:
DB_PREFIX."download_cats" is the same as DB_DOWNLOAD_CATS.
Category Forum
Panels and InfusionsLabels
None yet
Statistics
5 participants
Notifications
You are not receiving notifications from this thread.
Related Questions