MySQLi Insert/Update multiple entries?
I have an image upload facility which allows users to upload a banner image and some text. Users have to be logged in to an admin CMS to do this.
My banner image database table has a userID and domainID field so that the banner is associated with the user who uploaded it and also the domain on which it should be displayed.
However, the domain might have multiple admin users. I have created a link table which contains userIDs linking them to domains they're authorised to edit however I can't check the banner image table against this because I only have one userID field in that table.
So, I've considered creating a banner/user link table so that a banner image can be associated with multiple users but I'm not sure how I set, on Insert, multiple entries into the banner/user link table.
I don't want the user to have to select everyone else, within their company, to be authorised to edit the banner.
Can I do this in a hidden way? By cross-checking the domainID in the user/domain link table and inserting multiple entries into the user/banner table upon clicking of a submit button, for example?
How are multiple entries achieved in MySQLi when it's based on a recordset set of results?
Man, I'm so bad at explaining what's in my head! (sorry)
Hope you can help me make sense of this.
Thank you.
NJ