Remove Style Note

'."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo '
'."\n"; echo safe($note_row['note'])."\n"; echo '
'."\n"; echo ''."\n"; $query='select count(*) from style_sub where sg="'.$Comp_SG.'" and note_num="'.$NoteNum.'"'; $cnt_res=mysqli_query($db, $query); $cnt_row=mysqli_fetch_row($cnt_res); $UseCnt=$cnt_row[0]; if ($UseCnt > 0) { echo 'Note '.$NoteNum.' is used by the following Sub-Categories
'."\n"; echo 'The note will be cleared from Sub-Category after removal

'."\n"; $query='select type_seq, cat, sub_cat from style_sub where sg="'.$Comp_SG.'" and note_num="'.$NoteNum.'"'; $query.=' order by type_seq, cat, sub_cat'; $sub_res=mysqli_query($db, $query); while ($sub_row = mysqli_fetch_assoc($sub_res)) { list($CatDesc, $SubCatDesc)=get_desc($sub_row['type_seq'], $sub_row['cat'], $sub_row['sub_cat']); echo ''.disp_cat($sub_row['type_seq'], $sub_row['cat'].$sub_row['sub_cat']).' — '.$CatDesc.' - '.$SubCatDesc.'
'."\n"; } } echo '
'."\n"; ?>