$DB->query("INSERT INTO torrents_group (ID, NumArtists)
SELECTta.GroupID,COUNT(ta.ArtistID)
FROMtorrents_artistsASta
WHEREta.GroupID='$GroupID'
ANDta.Importance='1'
GROUPBYta.GroupID
ONDUPLICATEKEYUPDATE
NumArtists=VALUES(NumArtists);");
$Cache->delete_value('torrents_details_'.$GroupID);// Delete torrent group cache
$Cache->delete_value('groups_artists_'.$GroupID);// Delete group artist cache
write_log("Artist ".$ArtistID." (".$ArtistName.") was removed from the group ".$GroupID." (".$GroupName.") by user ".$LoggedUser['ID']." (".$LoggedUser['Username'].")");