Line 813... |
Line 813... |
813 |
This was originally used to define the join from the intermediary table to the target table, but is no longer implemented
|
813 |
This was originally used to define the join from the intermediary table to the target table, but is no longer implemented
|
814 |
</td>
|
814 |
</td>
|
815 |
</tr>
|
815 |
</tr>
|
816 |
</tbody>
|
816 |
</tbody>
|
817 |
</table>
|
817 |
</table>
|
- |
|
818 |
<h3>children</h3>
|
- |
|
819 |
<p>children is the way to define one or more child tables. A child table is similar to a lookup table, but it is more complex in that it may have multiple display columns, may be joined to other tables, etc... However, a child table is a direct descendant of the current table, ie it will not join ot another row in the current table.</p>
|
- |
|
820 |
<p>children only has two values; the name of the table which is a child, and the column in the child table that is used for the join. If the latter is missing, it is assumed to be the same as the primary key of the current table.</p>
|
- |
|
821 |
<p>During edit, all rows in the child table belonging to the current table are displayed in tabular form, using the 'display query' defined in that table.</p>
|
818 |
<h3>Example</h3>
|
822 |
<h3>Example</h3>
|
819 |
<p>Following example is based upon a real life application that stores knowledge base articles. Articles can be associated with one or more categories, and the categories table is hierachial in that each entry has a "parent node" column which links it to another entry in the same table</p>
|
823 |
<p>Following example is based upon a real life application that stores knowledge base articles. Articles can be associated with one or more categories, and the categories table is hierachial in that each entry has a "parent node" column which links it to another entry in the same table</p>
|
820 |
<p>Note the foreign key definition in table categories, and the many-to-many relationship in articles, going into categories.</p>
|
824 |
<p>Note the foreign key definition in table categories, and the many-to-many relationship in articles, going into categories.</p>
|
821 |
<pre>
|
825 |
<pre>
|
822 |
define ( MAX_INPUT_FIELD_DISPLAY, 80 ); // this is the maximum input field size
|
826 |
define ( MAX_INPUT_FIELD_DISPLAY, 80 ); // this is the maximum input field size
|