Custom dropdown field added to media gallery; how to get it to save properly?

I think you need to change the value of id in select field

$output = "<select name="attachments[{$id}][kgal_artwork_artist]" id='attachments-'.$id.'-kgal_artwork_artist'>";

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)