%preserve_order%>
<%insert_title%> : Top Rated Products
<%include:header%>
$howmany = 50;
$sqlquery = "SELECT link_name, link_rating, link_votes, inl_links.link_id, cust1, cust7 FROM inl_links
LEFT JOIN inl_custom ON inl_links.link_cust=inl_custom.cust_id where link_votes > 4 order by link_rating DESC, link_votes DESC LIMIT $howmany";
$result = mysql_query($sqlquery);
$number = mysql_numrows($result);
$i = 0;
if ($number < 2) {
return false;
}
else { ?>
| |
Product |
License |
Rating |
Votes |
while ($number > $i) {
$id = mysql_result($result,$i,"link_id");
$product = mysql_result($result,$i,"link_name");
$version = mysql_result($result,$i,"cust7");
$license = mysql_result($result,$i,"cust1");
$rating = mysql_result($result,$i,"link_rating");
$rating = number_format($rating,2);
$votes = mysql_result($result,$i,"link_votes");
$votes = number_format($votes);
$fproduct = ereg_replace(' ','_',$product);
$count = $i + 1;
echo "
| $count. |
$product $version |
$license |
$rating |
$votes |
";
$i++;
}?>
} ?>
<%include:footer%>