0) { $bg_row=get_bg($BrewerNo, $GroupNum); $GoodGroup=($bg_row['brewer'] > 0 || $bg_row['group_num'] > 0); } } $Remove=($GoodGroup && $bg_row['removed'] == 'N'); if ($GoodAcct && $GoodGroup) { $query='update brew_group set removed="'.($Remove ? 'Y' : 'N').'" where brewer="'.$BrewerNo.'" and group_num="'.$GroupNum.'"'; mysqli_query($db, $query); if (mysqli_affected_rows($db)==1) { $Failed=FALSE; $query='insert into changelog values(null, null, "'.$Key.'", "brew_group", "'.($Remove ? 'D' : 'U').'", "", "'.$BrewerNo.':'.$GroupNum.'", "", "")'; mysqli_query($db, $query); } else { $Failed=TRUE; } } if ($GoodAcct === FALSE) { $Page='0;url=failed.php'; } else { $Page='0;url=brewgrp_list.php?k='.$Key.$Add; } ?>