Remove Category

0) { echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; $query='select * from style_sub where sg="'.$Comp_SG.'" and type_seq="'.$TypeSeq.'" and cat="'.$Cat.'" order by sub_cat'; $subcat_res=mysqli_query($db, $query); while ($subcat_row=mysqli_fetch_assoc($subcat_res)) { echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; } echo '
'."\n"; echo 'The following Sub-Categories will be Removed'."\n"; echo '
'."\n"; echo $subcat_row['sub_cat']."\n"; echo ''."\n"; echo $subcat_row['cat_desc']."\n"; echo '
'."\n"; echo '
'."\n"; } $query='select count(*) from style_prefs where rank>0 and type_seq="'.$TypeSeq.'" and cat="'.$Cat.'"'; $pref_res=mysqli_query($db, $query); $pref_row=mysqli_fetch_row($pref_res); $Likes=($pref_row[0] > 0); $query='select count(*) from style_prefs where rank<0 and type_seq="'.$TypeSeq.'" and cat="'.$Cat.'"'; $pref_res=mysqli_query($db, $query); $pref_row=mysqli_fetch_row($pref_res); $Dislikes=($pref_row[0] > 0); if ($Likes || $Dislikes) { echo 'Category '.$Cat.' is used for Judge/Steward '.($Likes ? 'Likes' : '').($Likes && $Dislikes ? ' and ' : '').($Dislikes ? 'Dislikes' : '').'
'."\n"; echo 'These will be removed if the Category is removed
'."\n"; echo '
'."\n"; } ?>