Here, John
Smith is the content and 1 is the id. The default display is controlled by:
$cfg['ForeignKeyDropdownOrder'] = array( 'content-id', 'id-content');
We can use one or both of the strings content-id and id-content in the defining
array, in the order we prefer. Thus, defining $cfg['ForeignKeyDropdownOrder']
to array('id-content') would produce:
The Browseable Foreign-Table Window
Our current author tables have very few entries??”two in fact. Thus, to illustrate this
mechanism we will set the $cfg['ForeignKeyMaxLimit'] to an artificially low
number, 1. Now in Insert mode for the book table, we see a small table-shaped icon
for author_id, as shown in the screenshot that follows:
This icon opens another window presenting the values of the table author and
a Search input field. On the left, the values are sorted by key value (here, the
author_id column), and on the right, they are sorted by description. We have added
a third author to better see the difference in sorting:
Chapter 11
[ 191 ]
Choosing one of the values (by clicking either a key value or a description) closes this
window and brings the value back to the author_id column.
Referential Integrity Checks
We discussed the Operations sub-page and its Table maintenance section in Chapter
10. For this exercise, we suppose that both the book and author tables are not under the
control of the InnoDB storage engine.
Pages:
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188