图库中的默认图像

I'm building app in which you can have a gallery, but if you don't have images in the right moment you can choose from default images.

The admin put from the back end images in the default_images MySQL table.

User can upload also images but in different table gallery_images MySQL table. The user can choose also some of the default images.

This is the trick part he can choose many images on the same time from the defaults or uncheck them.

I can put the defaults also in the gallery_images which are related to the users upload images but when he uncheck some of the defaults i need to remove all users default and insert them again (because i don't know which one of them is removed).

The question is how to combine the two functionalities in one table without the need to delete and insert all of the defaults on update.

enter image description here