$query = "SELECT a.name, a.cat_id
FROM models_cat as a, models_cat_in_supra_cat as b
WHERE b.supra_cat_id = a.cat_id
AND b.supra_cat_id = '$supra'
ORDER BY a.name DESC";
$result = mysql_query($query) or die("Query failed");
$count=0;
while ($line = mysql_fetch_array($result, MYSQL_ASSOC))
{
$row[$count]=$line;
$count++;
echo"<LI><a href=\"models.php?supra=" . $supra . "&sub=" . $row[$count][cat_id] . "\">" . $row[$count][name] . "</a>\n";
}
The parts in blue are the parts I know are wrong. What's right?
Don't worry about count and that, I have that fine.