We are going to use the specific table dvd_zone we created at the beginning of this tutorial. Go to
the edition of the structure edit_dvd, we are going to use this option :
To create a multi-select row, enter its name here (only alphanumeric characters)
Write multi_zone and validate. A new line shows up in the current structure :
multi_zone
Insertion ? Update ?
Multi selection, waiting for confirmation to edit it.
Give a name to this new option, select update option (it doesn't work directly on insertion) and add
this structure to the current configuration. A new link appear to edit the multi selection configuration.
Follow this link to this screen :
Waiting for all the data to allow saving function
Some comments about these informations :
- Title of the current multi selection structure : this is a name I decided to use as a title in the
previous page.
- Current table : we are currently making a structure for the table dvd.
- Primary key : dvd_id is indeed the primary key for the table dvd, evething's alright.
- the link table : we must indicate here what table we want to use as link. In this case,
this is the table dvd_zone.
- the table to link : we must indicate here what table we want to link. In this case, this is the
table zone.
- type of multi-select : we have not pictures to show here, and we don't want (yet) to use a search
engine, so we use multi_select.
Make these changes and validate. You have now :
Waiting for all the data to allow saving function
We have some things to select :
- for the link table, we must specify the id : link_id.
- for the linked table (zone), mlam knows that zone_id is its primary id, but we have to
give here what field to use in dvd_zone to match this id. In our case, we use zone_link_id.
- the line dvd : waiting for its external id waits for the same indication than in the previous line,
but for the table dvd. In our case, this is dvd_link_id.
- lastly, we must choose a field whose content will be used to show the data. We'll use zone.
Validate your changes. You have now the possibility to save the configuration file, so do it, return to
the main page and save the configuration file (the first time, it was an unaccurate message, sorry). Now
go back to your tool, in the url edit_dvd.php, and edit a dvd. You'll have something like this :
Zones
Movie name
Movie title : Year of release :
Look for title
Comment
Select zone 1, validate the changes, and you have now :
Zones
Select the elements to suppress Zone 1
Movie name
Movie title : Year of release :
Look for title
Comment
You can add other values. You're only limited to the number of elements available in your linked table.