| version 1.16, 2003/03/29 01:33:02 |
version 1.17, 2003/03/29 15:38:03 |
|
|
| <!-- $Platon: phpMyEdit/doc/sgml/configuration.fields.sgml,v 1.15 2003/02/07 12:36:25 nepto Exp $ --> |
<!-- $Platon: phpMyEdit/doc/sgml/configuration.fields.sgml,v 1.16 2003/03/29 01:33:02 nepto Exp $ --> |
| |
|
| <!-- Categories: |
<!-- Categories: |
| |
|
| Line 274 Examples appear below. |
|
| Line 274 Examples appear below. |
|
| <example><title>Simple input restriction</title> |
<example><title>Simple input restriction</title> |
| <programlisting><![CDATA[ |
<programlisting><![CDATA[ |
| $opts['fdd']['col_name']['values'] = array('','No','Yes'); // default is '' (nothing) |
$opts['fdd']['col_name']['values'] = array('','No','Yes'); // default is '' (nothing) |
| $opts['fdd']['col_name']['values'] = array('','Yes','No'); // default is ''(nothing) |
$opts['fdd']['col_name']['values'] = array('','Yes','No'); // default is '' (nothing) |
| $opts['fdd']['col_name']['values'] = array('0','1'); // default is 0 |
$opts['fdd']['col_name']['values'] = array('0','1'); // default is 0 |
| $opts['fdd']['col_name']['values'] = array('A','B','C'); // default is A |
$opts['fdd']['col_name']['values'] = array('A','B','C'); // default is A |
| $opts['fdd']['col_name']['values'] = array('No','Yes'); // default is No |
$opts['fdd']['col_name']['values'] = array('No','Yes'); // default is No |
| Line 337 for id, first name, and last name, you c |
|
| Line 337 for id, first name, and last name, you c |
|
| |
|
| <example><title>Complex table lookup example</title> |
<example><title>Complex table lookup example</title> |
| <programlisting><![CDATA[ |
<programlisting><![CDATA[ |
| $opts['fdd']['col_name']['values']['db'] = 'mydb'; // optional |
$opts['fdd']['col_name']['values']['db'] = 'mydb'; // optional |
| $opts['fdd']['col_name']['values']['table'] = 'mytable'; |
$opts['fdd']['col_name']['values']['table'] = 'mytable'; |
| $opts['fdd']['col_name']['values']['column'] = 'id'; |
$opts['fdd']['col_name']['values']['column'] = 'id'; |
| $opts['fdd']['col_name']['values']['description']['columns']['1'] = 'name_last'; |
$opts['fdd']['col_name']['values']['description']['columns'][0] = 'name_last'; |
| $opts['fdd']['col_name']['values']['description']['divs']['1'] = ', '; |
$opts['fdd']['col_name']['values']['description']['divs'][0] = ', '; |
| $opts['fdd']['col_name']['values']['description']['columns']['2'] = 'name_first'; |
$opts['fdd']['col_name']['values']['description']['columns'][1] = 'name_first'; |
| $opts['fdd']['col_name']['values']['filters'] = 'id in (1,2,3)'; // optional WHERE clause |
$opts['fdd']['col_name']['values']['filters'] = 'id IN (1,2,3)'; // optional WHERE clause |
| $opts['fdd']['col_name']['values']['orderby'] = 'last_name'; // optional ORDER BY clause |
$opts['fdd']['col_name']['values']['orderby'] = 'last_name'; // optional ORDER BY clause |
| ]]></programlisting> |
]]></programlisting> |
| </example> |
</example> |
| |
|
| </para> |
</para> |
| <para> |
<para> |
| |
|
| |
If prefixation with some string in column description is desired, the |
| |
<varname>$opts['fdd']['col_name']['values']['description']['divs'][-1]</> can |
| |
be used. It will precede |
| |
<varname>$opts['fdd']['col_name']['values']['description']['columns'][0]</> |
| |
column. |
| |
|
| |
</para> |
| |
<para> |
| |
|
| Note that the above example contains additional features, such as filtering |
Note that the above example contains additional features, such as filtering |
| values using <varname>['filters']</>, and ordering values using |
values using <varname>['filters']</>, and ordering values using |