THE BUNGHOLE - What's cool"; ?> What's Cool\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n";
echo "\n";
$query = mysql_query("SELECT 1 FROM bunghole_links WHERE is_cool > 0;");
$totalnumber = mysql_num_rows($query);
$category = "";
$query = mysql_query("SELECT id, title, category, description, date_added, hits, is_new, rating, votes FROM bunghole_links WHERE is_cool > 0 ORDER BY category, title LIMIT $start, 11;");
$end = mysql_num_rows($query);
if(!$end)
echo "No results for what's cool section.\n";
else {
echo "Showing records ",$start+1," to ";
if($end == 11) echo "".$start+$end-1;
else echo "".$start+$end;
echo " out of $totalnumber records. Sorted by category and title. "; // Show records // We will only show 10 records, the eleventh is to see if more records exist $count = 1; while($count <= $end) { $result = mysql_fetch_array($query); if($category != $result["category"]) { if($category != "") echo "\n"; $category = $result["category"]; echo " From $category category:\n"; echo "
|