Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: uploaders top

Parašė skilerlt· 2012 Vas. 6 12:02:09
#1

Sveiki noriu kad veiktu uploaderiu top.Naudoju si koda:
openside("Top Uploaderiai");
$result = dbquery("SELECT user_name, user_id, count(user_id) AS download_count FROM ".$db_prefix."downloads
INNER JOIN ".$db_prefix."users ON download_license=user_name GROUP BY download_license ORDER BY download_count DESC LIMIT 5");
echo "<table width='100%' cellpadding='0' cellspacing='0'>";
if(dbrows($result)!=0){
while($data=dbarray($result)){
echo "<tr><td class='small2' align='left'> <img src='/images/star.gif'>
<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' class='side'>$data[user_name]</a></td>
<td class='small2' align='right'>".$data['download_count']."</td></tr>";
}
} else echo "<tr><td align='center'>Nieko nera.</td></tr>";
echo "</table>";
closeside();





I pridetinius puslapius rasau:
<?php
$result = dbquery("ALTER TABLE ".$db_prefix."downloads ADD download_status VARCHAR(10) NOT NULL DEFAULT 'active' AFTER download_count");
if ($result) {
echo "Kuriamas pirmasis laukas... Laukas Sukurtas<br><br>";
} else {
echo "Kuriamas pirmasis laukas... NEPAVYKO<br>";
echo mysql_error();
echo "<br><br>";
}

$result = dbquery("ALTER TABLE ".$db_prefix."downloads ADD download_author SMALLINT(5) NOT NULL AFTER download_status");
if ($result) {
echo "Kuriamas antrasis laukas... Laukas Sukurtas<br><br>";
} else {
echo "Kuriamas antrasis laukas... NEPAVYKO<br>";
echo mysql_error();
echo "<br><br>";
}
?>





Dedu siuntini ir nieko.. Nerodo. Kokia siuntiniu systema i det ar ka kad veiktu??