Hi,
I'm somewhat new to the whole PHP & MySQL database and currently working on a complex project and need some assistance.
I have 3 basic tables,
Table 1 contains the following info
Image_ID, & all related pictures info
Table2 contains the follwoing info
Gallery_ID, Gallery_Title, Gallery_Description
Table3 contains 3 things
ID, Gallery_ID, Image_ID
what i want to do is be able to assign multiple pictures to multiple galleries and some images might appear in several galleries. So of course a sample entry in table 3 might be
ID-1, Gallery_ID-12, Image_ID-16
but where i need the help is I want to be able to add, and update which galleries images are in, so i'm putting all the possible galleries into a drop-down box that allows multiple selections, but I'm not sure how to have it search to see if the image already exists in the gallery, and if not then add it or update it, is there an easy approach without running several queries all at once.