100){ $error = "Bad Query"; } else{ $c_result = mysql_query($c_select) or doError(mysql_error(),$c_select,$page,$testing); $c = mysql_fetch_object($c_result); $pcid = $c->cid; $title = strip_tags(catNav($pcid,$string)); } } else{ $pcid = 0; } include("imageswap.inc"); ?> D&M Custom Cycle - <? echo $title; ?>
Category: $string"; } ?> cid; } $sc_select = "select * from tbl_category where parent_cid = '$subpcid' order by cat_name"; $sc_result = mysql_query($sc_select) or doError(mysql_error(),$sc_select,$page,$testing); $count = 0; while($sc = mysql_fetch_object($sc_result)){ //Check for Sub Cats $c2_select = "select * from tbl_category where parent_cid = '$sc->cid'"; $c2_result = mysql_query($c2_select) or doError(mysql_error(),$c2_select,$page,$testing); if(mysql_num_rows($c2_result) > 0){ $link = "c"; } else{ $link = "p"; } if($count%3 == 0){ echo ""; } $count++; echo ""; } if($link == "p"){ echo "
$sc->cat_name
"; } if($count%3 == 0){ echo ""; } } ?>
"; if($sc->icon == ''){ $icon = "images/placeholder.gif"; } else{ $icon = "cats/".$sc->icon; } if($link == "c"){ echo "
$sc->cat_name