query("
SELECT Name
FROM artists_group
WHERE ArtistID = $ArtistID");
list($Name) = $DB->next_record();
$DB->query("
SELECT tg.Name, tg.ID
FROM torrents_group AS tg
LEFT JOIN torrents_artists AS ta ON ta.GroupID = tg.ID
WHERE ta.ArtistID = $ArtistID");
$Count = $DB->record_count();
if ($DB->has_results()) {
?>
There are still torrents that have
=$Name?> as an artist.
Please remove the artist from these torrents manually before attempting to delete.
while (list($GroupName, $GroupID) = $DB->next_record(MYSQLI_NUM, true)) {
?>
-
=$GroupName?>
}
?>
}
$DB->query("
SELECT r.Title, r.ID
FROM requests AS r
LEFT JOIN requests_artists AS ra ON ra.RequestID = r.ID
WHERE ra.ArtistID = $ArtistID");
$Count += $DB->record_count();
if ($DB->has_results()) {
?>
There are still requests that have
=$Name?> as an artist.
Please remove the artist from these requests manually before attempting to delete.
while (list($RequestName, $RequestID) = $DB->next_record(MYSQLI_NUM, true)) {
?>
-
=$RequestName?>
}
?>
}
if ($Count == 0) {
Artists::delete_artist($ArtistID);
?>
Artist "=$Name?>" deleted!
}
View::show_footer();?>
*/