Rozdiely pre phpMyEdit/comprehensive/comprehensive.php medzi verziami 1.1 a 1.2
| verzia 1.1, 2002/08/09 23:14:43 |
verzia 1.2, 2002/08/27 23:59:33 |
|
|
| <div class="main"> |
|
| <h3><?php echo 'comprehensive'; ?></h3> |
|
| <?php |
<?php |
| |
|
| |
/* Modify this array to get only particular subset from testing fields. */ |
| |
$used_cols = array( |
| |
'tinyint' => 0, |
| |
'smallint' => 0, |
| |
'mediumint' => 0, |
| |
'int' => 0, |
| |
'bigint' => 0, |
| |
'float' => 0, |
| |
'decimal' => 0, |
| |
'datetime' => 1, |
| |
'timestamp' => 0, |
| |
'char' => 0, |
| |
'text' => 0, |
| |
'enum' => 1 |
| |
); |
| |
|
| // MySQL host name, user name, password, database, and table to edit |
// MySQL host name, user name, password, database, and table to edit |
| $opts["hn"]="localhost"; |
$opts["hn"]="localhost"; |
| $opts["un"]="test"; |
$opts["un"]="test"; |
| Riadok 39 $opts['display_query']=true; |
|
| Riadok 54 $opts['display_query']=true; |
|
| $opts['display_sort']=true; |
$opts['display_sort']=true; |
| |
|
| /* |
/* |
| Field definitions. Fields will be displayed left to right |
Field definitions. Fields will be displayed left to right |
| on the screen in the order in which they appear in this list. |
on the screen in the order in which they appear in this list. |
| ['name'] is the title used for column headings, etc.; |
['name'] is the title used for column headings, etc.; |
| ['sort'] = true means the users may sort the display on this column; |
['sort'] = true means the users may sort the display on this column; |
| ['type'] is generated by SETUP.php and indicates the mysql field type |
['type'] is generated by SETUP.php and indicates the mysql field type |
| best not edited |
best not edited |
| ['maxlen'] maximum length to display add/edit/search input boxes |
['maxlen'] maximum length to display add/edit/search input boxes |
| ['trimlen'] maximum length of string content to display in row listing |
['trimlen'] maximum length of string content to display in row listing |
| if strlen(value) > trimlen, display substr(,0,trimlen-3).'...' |
if strlen(value) > trimlen, display substr(,0,trimlen-3).'...' |
| ['width'] is an optional display width specification for the column, |
['width'] is an optional display width specification for the column, |
| e.g. ['width'] = '100px'; |
e.g. ['width'] = '100px'; |
| or $fdd['colname']['width'] = ($fdd['colname']['trimlen'] * 8).'px'; |
or $fdd['colname']['width'] = ($fdd['colname']['trimlen'] * 8).'px'; |
| ['nowrap'] true or false. whether this field should get a NOWRAP |
['nowrap'] true or false. whether this field should get a NOWRAP |
| ['mask'] a string that is used by sprintf() to format field output |
['mask'] a string that is used by sprintf() to format field output |
| ['datemask'] a string that is used by date() to format date fields |
['datemask'] a string that is used by date() to format date fields |
| see PHP's date() for valid formatting characters |
see PHP's date() for valid formatting characters |
| ['daterange'] a of numbers |
['daterange'] a of numbers |
| ['daterange']['start'] = 1996; |
['daterange']['start'] = 1996; |
| ['daterange']['end'] = $fdd['colname']['daterange']['start']+20; |
['daterange']['end'] = $fdd['colname']['daterange']['start']+20; |
| ['URL'] is used to make a field 'clickable' in the display, e.g.: |
['URL'] is used to make a field 'clickable' in the display, e.g.: |
| ['URL'] = 'mailto:' or ['URL'] = 'http://'; |
['URL'] = 'mailto:' or ['URL'] = 'http://'; |
| ['URL'] = '$page?stuff'; |
['URL'] = '$page?stuff'; |
| Note that the following are available as variables: |
Note that the following are available as variables: |
| $key key field for record |
$key key field for record |
| $name name of the field |
$name name of the field |
| $value value of the field |
$value value of the field |
| $page this HTML page |
$page this HTML page |
| $row mysql_fetch_assoc() for this row |
$row mysql_fetch_assoc() for this row |
| ['required'] = true will generate javascript to prevent null entries by users |
['required'] = true will generate javascript to prevent null entries by users |
| ['options'] is an optional parameter to control whether a field is |
['options'] is an optional parameter to control whether a field is |
| displayed in the A(dd), C(hange), D(elete), view, or L(ist) views |
displayed in the A(dd), C(hange), D(elete), view, or L(ist) views |
| ['options']='R' indicates that a field is read only |
['options']='R' indicates that a field is read only |
| ['options']='P' indicates that a field is a password field |
['options']='P' indicates that a field is a password field |
| ['options']='H' indicates that a field is to be hidden |
['options']='H' indicates that a field is to be hidden |
| and marked as hidden |
and marked as hidden |
| ['textarea']['rows'] and/or ['textarea']['cols'] specifies a |
['textarea']['rows'] and/or ['textarea']['cols'] specifies a |
| textarea is to be used to give multi-line input, |
textarea is to be used to give multi-line input, |
| e.g. ['textarea']['rows'] = 5; ['textarea']['cols'] = 10 |
e.g. ['textarea']['rows'] = 5; ['textarea']['cols'] = 10 |
| ['values'] restricts user input to the specified constants, |
['values'] restricts user input to the specified constants, |
| e.g. ['values'] = array('A','B','C') |
e.g. ['values'] = array('A','B','C') |
| or ['values'] = range(1,99); |
or ['values'] = range(1,99); |
| ['values']['table'] and ['values']['column'] restricts user |
['values']['table'] and ['values']['column'] restricts user |
| input to the values found in the specified column of another table. |
input to the values found in the specified column of another table. |
| The optional ['values']['description'] field allows the value(s) displayed |
The optional ['values']['description'] field allows the value(s) displayed |
| to the user to be different to those in the ['values']['column'] field. |
to the user to be different to those in the ['values']['column'] field. |
| This is useful for giving more meaning to column values. There are two main |
This is useful for giving more meaning to column values. There are two main |
| options when using the ['values']['description'] field. These are whether you |
options when using the ['values']['description'] field. These are whether you |
| want to use a single, or multiple field in your description. To apply single, |
want to use a single, or multiple field in your description. To apply single, |
| you need to use: |
you need to use: |
| ['values']['description'] = 'desc_column' |
['values']['description'] = 'desc_column' |
| This may be used, with no other options, and will simply display the description |
This may be used, with no other options, and will simply display the description |
| for the corresponding value. |
for the corresponding value. |
| For Multiple, use: |
For Multiple, use: |
| ['values']['description']['columns']['1'] = 'desc_column_1' |
['values']['description']['columns']['1'] = 'desc_column_1' |
| ['values']['description']['divs']['1'] = ' ' |
['values']['description']['divs']['1'] = ' ' |
| ['values']['description']['columns']['2'] = 'desc_column_2' |
['values']['description']['columns']['2'] = 'desc_column_2' |
| The 'div' component is what will be used as a divider between the columns |
The 'div' component is what will be used as a divider between the columns |
| in the display. You don't need to define the last 'div' field if it isn't |
in the display. You don't need to define the last 'div' field if it isn't |
| required. So, for example...if you have a series of people in a |
required. So, for example...if you have a series of people in a |
| table, with a separate column for id, first name, and last name, you could |
table, with a separate column for id, first name, and last name, you could |
| use: |
use: |
| ['values']['db']='mydb' *optional if table is in another database* |
['values']['db']='mydb' *optional if table is in another database* |
| ['values']['table']='mytable' |
['values']['table']='mytable' |
| ['values']['column']='id' |
['values']['column']='id' |
| ['values']['description']['columns']['1']='last_name' |
['values']['description']['columns']['1']='last_name' |
| ['values']['description']['divs']['1'] =', ' |
['values']['description']['divs']['1'] =', ' |
| ['values']['description']['columns']['2']='first_name' |
['values']['description']['columns']['2']='first_name' |
| ['values']['filters']='idcolumn in (1,2,3)' *optional WHERE clause* |
['values']['filters']='idcolumn in (1,2,3)' *optional WHERE clause* |
| ['values']['orderby']='last_name' *optional ORDER BY clause* |
['values']['orderby']='last_name' *optional ORDER BY clause* |
| if a column is either SET or ENUM type, then the values are put in |
if a column is either SET or ENUM type, then the values are put in |
| by PME Setup. |
by PME Setup. |
| ['select'] = 'T/D/M' (text, drop-down, or multiple selection for filters) |
['select'] = 'T/D/M' (text, drop-down, or multiple selection for filters) |
| if a column is a SET type, then this is automatically 'M' |
if a column is a SET type, then this is automatically 'M' |
| Calculated Expressions |
Calculated Expressions |
| example: |
example: |
| $fdd['other']['name']='Col Header'; |
$fdd['other']['name']='Col Header'; |
| $fdd['other']['expression']='onHand-ordered'; |
$fdd['other']['expression']='onHand-ordered'; |
| $fdd['other']['sort']='T:!'; |
$fdd['other']['sort']='T:!'; |
| $fdd['other']['select']='T'; |
$fdd['other']['select']='T'; |
| $fdd['other']['type']='int'; |
$fdd['other']['type']='int'; |
| 'other' can be anything, but needs to be unique within the list of $fdd keys |
'other' can be anything, but needs to be unique within the list of $fdd keys |
| 'expression' can be any valid MySQL expression |
'expression' can be any valid MySQL expression |
| 'type' should reflect the results of the expression, e.g. 'int' or 'string' |
'type' should reflect the results of the expression, e.g. 'int' or 'string' |
| all other options work as with other, normal columns |
all other options work as with other, normal columns |
| this kind of column is always read-only |
this kind of column is always read-only |
| */ |
*/ |
| $fdd["xtinyint"] = array( |
|
| 'name'=>'Xtinyint', |
|
| 'select'=>'T', |
|
| 'type'=>'int', |
|
| 'maxlen'=>4, |
|
| 'nowrap'=>false, |
|
| 'default'=>'0', |
|
| 'sort'=>true |
|
| ); |
|
| |
|
| $fdd["xtinyint_u"] = array( |
|
| 'name'=>'Xtinyint U', |
|
| 'select'=>'T', |
|
| 'type'=>'int', |
|
| 'maxlen'=>3, |
|
| 'nowrap'=>false, |
|
| 'default'=>'0', |
|
| 'sort'=>true |
|
| ); |
|
| |
|
| $fdd["xtinyint_z"] = array( |
|
| 'name'=>'Xtinyint Z', |
|
| 'select'=>'T', |
|
| 'type'=>'int', |
|
| 'maxlen'=>3, |
|
| 'nowrap'=>false, |
|
| 'default'=>'000', |
|
| 'sort'=>true |
|
| ); |
|
| |
|
| $fdd["xtinyint_u_z"] = array( |
|
| 'name'=>'Xtinyint U Z', |
|
| 'select'=>'T', |
|
| 'type'=>'int', |
|
| 'maxlen'=>3, |
|
| 'nowrap'=>false, |
|
| 'default'=>'000', |
|
| 'sort'=>true |
|
| ); |
|
| |
|
| $fdd["xsmallint"] = array( |
|
| 'name'=>'Xsmallint', |
|
| 'select'=>'T', |
|
| 'type'=>'int', |
|
| 'maxlen'=>6, |
|
| 'nowrap'=>false, |
|
| 'default'=>'0', |
|
| 'sort'=>true |
|
| ); |
|
| |
|
| $fdd["xsmallint_u"] = array( |
|
| 'name'=>'Xsmallint U', |
|
| 'select'=>'T', |
|
| 'type'=>'int', |
|
| 'maxlen'=>5, |
|
| 'nowrap'=>false, |
|
| 'default'=>'0', |
|
| 'sort'=>true |
|
| ); |
|
| |
|
| $fdd["xsmallint_z"] = array( |
|
| 'name'=>'Xsmallint Z', |
|
| 'select'=>'T', |
|
| 'type'=>'int', |
|
| 'maxlen'=>5, |
|
| 'nowrap'=>false, |
|
| 'default'=>'00000', |
|
| 'sort'=>true |
|
| ); |
|
| |
|
| $fdd["xsmallint_u_z"] = array( |
|
| 'name'=>'Xsmallint U Z', |
|
| 'select'=>'T', |
|
| 'type'=>'int', |
|
| 'maxlen'=>5, |
|
| 'nowrap'=>false, |
|
| 'default'=>'00000', |
|
| 'sort'=>true |
|
| ); |
|
| |
|
| $fdd["xmediumint"] = array( |
|
| 'name'=>'Xmediumint', |
|
| 'select'=>'T', |
|
| 'type'=>'int', |
|
| 'maxlen'=>9, |
|
| 'nowrap'=>false, |
|
| 'default'=>'0', |
|
| 'sort'=>true |
|
| ); |
|
| |
|
| $fdd["xmediumint_u"] = array( |
|
| 'name'=>'Xmediumint U', |
|
| 'select'=>'T', |
|
| 'type'=>'int', |
|
| 'maxlen'=>8, |
|
| 'nowrap'=>false, |
|
| 'default'=>'0', |
|
| 'sort'=>true |
|
| ); |
|
| |
|
| $fdd["xmediumint_z"] = array( |
|
| 'name'=>'Xmediumint Z', |
|
| 'select'=>'T', |
|
| 'type'=>'int', |
|
| 'maxlen'=>8, |
|
| 'nowrap'=>false, |
|
| 'default'=>'00000000', |
|
| 'sort'=>true |
|
| ); |
|
| |
|
| $fdd["xmediumint_u_z"] = array( |
|
| 'name'=>'Xmediumint U Z', |
|
| 'select'=>'T', |
|
| 'type'=>'int', |
|
| 'maxlen'=>8, |
|
| 'nowrap'=>false, |
|
| 'default'=>'00000000', |
|
| 'sort'=>true |
|
| ); |
|
| |
|
| |
/* This should be always enabled, cause it is primary key */ |
| $fdd["xint"] = array( |
$fdd["xint"] = array( |
| 'name'=>'Xint', |
'name'=>'Xint', |
| 'select'=>'T', |
'select'=>'T', |
| 'type'=>'int', |
'type'=>'int', |
| 'maxlen'=>11, |
'maxlen'=>11, |
| 'nowrap'=>false, |
'nowrap'=>false, |
| 'required'=>true, |
'required'=>true, |
| 'default'=>'0', |
'default'=>'0', |
| 'sort'=>true |
'sort'=>true |
| ); |
); |
| |
|
| $fdd["xint_u"] = array( |
if ($used_cols['tinyint']) { |
| 'name'=>'Xint U', |
|
| 'select'=>'T', |
$fdd["xtinyint"] = array( |
| 'type'=>'int', |
'name'=>'Xtinyint', |
| 'maxlen'=>10, |
'select'=>'T', |
| 'nowrap'=>false, |
'type'=>'int', |
| 'default'=>'0', |
'maxlen'=>4, |
| 'sort'=>true |
'nowrap'=>false, |
| ); |
'default'=>'0', |
| |
'sort'=>true |
| $fdd["xint_z"] = array( |
); |
| 'name'=>'Xint Z', |
|
| 'select'=>'T', |
$fdd["xtinyint_u"] = array( |
| 'type'=>'int', |
'name'=>'Xtinyint U', |
| 'maxlen'=>10, |
'select'=>'T', |
| 'nowrap'=>false, |
'type'=>'int', |
| 'default'=>'0000000000', |
'maxlen'=>3, |
| 'sort'=>true |
'nowrap'=>false, |
| ); |
'default'=>'0', |
| |
'sort'=>true |
| $fdd["xint_u_z"] = array( |
); |
| 'name'=>'Xint U Z', |
|
| 'select'=>'T', |
$fdd["xtinyint_z"] = array( |
| 'type'=>'int', |
'name'=>'Xtinyint Z', |
| 'maxlen'=>10, |
'select'=>'T', |
| 'nowrap'=>false, |
'type'=>'int', |
| 'default'=>'0000000000', |
'maxlen'=>3, |
| 'sort'=>true |
'nowrap'=>false, |
| ); |
'default'=>'000', |
| |
'sort'=>true |
| $fdd["xinteger"] = array( |
); |
| 'name'=>'Xinteger', |
|
| 'select'=>'T', |
$fdd["xtinyint_u_z"] = array( |
| 'type'=>'int', |
'name'=>'Xtinyint U Z', |
| 'maxlen'=>11, |
'select'=>'T', |
| 'nowrap'=>false, |
'type'=>'int', |
| 'default'=>'0', |
'maxlen'=>3, |
| 'sort'=>true |
'nowrap'=>false, |
| ); |
'default'=>'000', |
| |
'sort'=>true |
| $fdd["xinteger_u"] = array( |
); |
| 'name'=>'Xinteger U', |
} |
| 'select'=>'T', |
|
| 'type'=>'int', |
if ($used_cols['smallint']) { |
| 'maxlen'=>10, |
|
| 'nowrap'=>false, |
$fdd["xsmallint"] = array( |
| 'default'=>'0', |
'name'=>'Xsmallint', |
| 'sort'=>true |
'select'=>'T', |
| ); |
'type'=>'int', |
| |
'maxlen'=>6, |
| $fdd["xinteger_z"] = array( |
'nowrap'=>false, |
| 'name'=>'Xinteger Z', |
'default'=>'0', |
| 'select'=>'T', |
'sort'=>true |
| 'type'=>'int', |
); |
| 'maxlen'=>10, |
|
| 'nowrap'=>false, |
$fdd["xsmallint_u"] = array( |
| 'default'=>'0000000000', |
'name'=>'Xsmallint U', |
| 'sort'=>true |
'select'=>'T', |
| ); |
'type'=>'int', |
| |
'maxlen'=>5, |
| $fdd["xinteger_u_z"] = array( |
'nowrap'=>false, |
| 'name'=>'Xinteger U Z', |
'default'=>'0', |
| 'select'=>'T', |
'sort'=>true |
| 'type'=>'int', |
); |
| 'maxlen'=>10, |
|
| 'nowrap'=>false, |
$fdd["xsmallint_z"] = array( |
| 'default'=>'0000000000', |
'name'=>'Xsmallint Z', |
| 'sort'=>true |
'select'=>'T', |
| ); |
'type'=>'int', |
| |
'maxlen'=>5, |
| $fdd["xbigint"] = array( |
'nowrap'=>false, |
| 'name'=>'Xbigint', |
'default'=>'00000', |
| 'select'=>'T', |
'sort'=>true |
| 'type'=>'int', |
); |
| 'maxlen'=>20, |
|
| 'nowrap'=>false, |
$fdd["xsmallint_u_z"] = array( |
| 'default'=>'0', |
'name'=>'Xsmallint U Z', |
| 'sort'=>true |
'select'=>'T', |
| ); |
'type'=>'int', |
| |
'maxlen'=>5, |
| $fdd["xbigint_u"] = array( |
'nowrap'=>false, |
| 'name'=>'Xbigint U', |
'default'=>'00000', |
| 'select'=>'T', |
'sort'=>true |
| 'type'=>'int', |
); |
| 'maxlen'=>20, |
} |
| 'nowrap'=>false, |
|
| 'default'=>'0', |
if ($used_cols['mediumint']) { |
| 'sort'=>true |
|
| ); |
$fdd["xmediumint"] = array( |
| |
'name'=>'Xmediumint', |
| $fdd["xbigint_z"] = array( |
'select'=>'T', |
| 'name'=>'Xbigint Z', |
'type'=>'int', |
| 'select'=>'T', |
'maxlen'=>9, |
| 'type'=>'int', |
'nowrap'=>false, |
| 'maxlen'=>20, |
'default'=>'0', |
| 'nowrap'=>false, |
'sort'=>true |
| 'default'=>'00000000000000000000', |
); |
| 'sort'=>true |
|
| ); |
$fdd["xmediumint_u"] = array( |
| |
'name'=>'Xmediumint U', |
| $fdd["xbigint_u_z"] = array( |
'select'=>'T', |
| 'name'=>'Xbigint U Z', |
'type'=>'int', |
| 'select'=>'T', |
'maxlen'=>8, |
| 'type'=>'int', |
'nowrap'=>false, |
| 'maxlen'=>20, |
'default'=>'0', |
| 'nowrap'=>false, |
'sort'=>true |
| 'default'=>'00000000000000000000', |
); |
| 'sort'=>true |
|
| ); |
$fdd["xmediumint_z"] = array( |
| |
'name'=>'Xmediumint Z', |
| $fdd["xfloat1"] = array( |
'select'=>'T', |
| 'name'=>'Xfloat1', |
'type'=>'int', |
| 'select'=>'T', |
'maxlen'=>8, |
| 'type'=>'real', |
'nowrap'=>false, |
| 'maxlen'=>12, |
'default'=>'00000000', |
| 'nowrap'=>false, |
'sort'=>true |
| 'default'=>'0', |
); |
| 'sort'=>true |
|
| ); |
$fdd["xmediumint_u_z"] = array( |
| |
'name'=>'Xmediumint U Z', |
| $fdd["xfloat1_z"] = array( |
'select'=>'T', |
| 'name'=>'Xfloat1 Z', |
'type'=>'int', |
| 'select'=>'T', |
'maxlen'=>8, |
| 'type'=>'real', |
'nowrap'=>false, |
| 'maxlen'=>12, |
'default'=>'00000000', |
| 'nowrap'=>false, |
'sort'=>true |
| 'default'=>'000000000000', |
); |
| 'sort'=>true |
} |
| ); |
|
| |
if ($used_cols['int']) { |
| $fdd["xfloat2"] = array( |
|
| 'name'=>'Xfloat2', |
$fdd["xint_u"] = array( |
| 'select'=>'T', |
'name'=>'Xint U', |
| 'type'=>'real', |
'select'=>'T', |
| 'maxlen'=>26, |
'type'=>'int', |
| 'nowrap'=>false, |
'maxlen'=>10, |
| 'default'=>'0.000000000000000000000000', |
'nowrap'=>false, |
| 'sort'=>true |
'default'=>'0', |
| ); |
'sort'=>true |
| |
); |
| $fdd["xfloat2_z"] = array( |
|
| 'name'=>'Xfloat2 Z', |
$fdd["xint_z"] = array( |
| 'select'=>'T', |
'name'=>'Xint Z', |
| 'type'=>'real', |
'select'=>'T', |
| 'maxlen'=>26, |
'type'=>'int', |
| 'nowrap'=>false, |
'maxlen'=>10, |
| 'default'=>'0.000000000000000000000000', |
'nowrap'=>false, |
| 'sort'=>true |
'default'=>'0000000000', |
| ); |
'sort'=>true |
| |
); |
| $fdd["xdouble2"] = array( |
|
| 'name'=>'Xdouble2', |
$fdd["xint_u_z"] = array( |
| 'select'=>'T', |
'name'=>'Xint U Z', |
| 'type'=>'real', |
'select'=>'T', |
| 'maxlen'=>26, |
'type'=>'int', |
| 'nowrap'=>false, |
'maxlen'=>10, |
| 'default'=>'0.000000000000000000000000', |
'nowrap'=>false, |
| 'sort'=>true |
'default'=>'0000000000', |
| ); |
'sort'=>true |
| |
); |
| $fdd["xdouble2_z"] = array( |
|
| 'name'=>'Xdouble2 Z', |
$fdd["xinteger"] = array( |
| 'select'=>'T', |
'name'=>'Xinteger', |
| 'type'=>'real', |
'select'=>'T', |
| 'maxlen'=>26, |
'type'=>'int', |
| 'nowrap'=>false, |
'maxlen'=>11, |
| 'default'=>'0.000000000000000000000000', |
'nowrap'=>false, |
| 'sort'=>true |
'default'=>'0', |
| ); |
'sort'=>true |
| |
); |
| $fdd["xreal2"] = array( |
|
| 'name'=>'Xreal2', |
$fdd["xinteger_u"] = array( |
| 'select'=>'T', |
'name'=>'Xinteger U', |
| 'type'=>'real', |
'select'=>'T', |
| 'maxlen'=>26, |
'type'=>'int', |
| 'nowrap'=>false, |
'maxlen'=>10, |
| 'default'=>'0.000000000000000000000000', |
'nowrap'=>false, |
| 'sort'=>true |
'default'=>'0', |
| ); |
'sort'=>true |
| |
); |
| $fdd["xreal2_z"] = array( |
|
| 'name'=>'Xreal2 Z', |
$fdd["xinteger_z"] = array( |
| 'select'=>'T', |
'name'=>'Xinteger Z', |
| 'type'=>'real', |
'select'=>'T', |
| 'maxlen'=>26, |
'type'=>'int', |
| 'nowrap'=>false, |
'maxlen'=>10, |
| 'default'=>'0.000000000000000000000000', |
'nowrap'=>false, |
| 'sort'=>true |
'default'=>'0000000000', |
| ); |
'sort'=>true |
| |
); |
| $fdd["xdecimal2"] = array( |
|
| 'name'=>'Xdecimal2', |
$fdd["xinteger_u_z"] = array( |
| 'select'=>'T', |
'name'=>'Xinteger U Z', |
| 'type'=>'real', |
'select'=>'T', |
| 'maxlen'=>28, |
'type'=>'int', |
| 'nowrap'=>false, |
'maxlen'=>10, |
| 'default'=>'0.000000000000000000000000', |
'nowrap'=>false, |
| 'sort'=>true |
'default'=>'0000000000', |
| ); |
'sort'=>true |
| |
); |
| $fdd["xdecimal2_z"] = array( |
} |
| 'name'=>'Xdecimal2 Z', |
|
| 'select'=>'T', |
if ($used_cols['int']) { |
| 'type'=>'real', |
|
| 'maxlen'=>27, |
$fdd["xbigint"] = array( |
| 'nowrap'=>false, |
'name'=>'Xbigint', |
| 'default'=>'00.000000000000000000000000', |
'select'=>'T', |
| 'sort'=>true |
'type'=>'int', |
| ); |
'maxlen'=>20, |
| |
'nowrap'=>false, |
| $fdd["xnumeric2"] = array( |
'default'=>'0', |
| 'name'=>'Xnumeric2', |
'sort'=>true |
| 'select'=>'T', |
); |
| 'type'=>'real', |
|
| 'maxlen'=>28, |
$fdd["xbigint_u"] = array( |
| 'nowrap'=>false, |
'name'=>'Xbigint U', |
| 'default'=>'0.000000000000000000000000', |
'select'=>'T', |
| 'sort'=>true |
'type'=>'int', |
| ); |
'maxlen'=>20, |
| |
'nowrap'=>false, |
| $fdd["xnumeric2_z"] = array( |
'default'=>'0', |
| 'name'=>'Xnumeric2 Z', |
'sort'=>true |
| 'select'=>'T', |
); |
| 'type'=>'real', |
|
| 'maxlen'=>27, |
$fdd["xbigint_z"] = array( |
| 'nowrap'=>false, |
'name'=>'Xbigint Z', |
| 'default'=>'00.000000000000000000000000', |
'select'=>'T', |
| 'sort'=>true |
'type'=>'int', |
| ); |
'maxlen'=>20, |
| |
'nowrap'=>false, |
| $fdd["xdate"] = array( |
'default'=>'00000000000000000000', |
| 'name'=>'Xdate', |
'sort'=>true |
| 'select'=>'T', |
); |
| 'type'=>'date', |
|
| 'maxlen'=>10, |
$fdd["xbigint_u_z"] = array( |
| 'nowrap'=>false, |
'name'=>'Xbigint U Z', |
| 'sort'=>true |
'select'=>'T', |
| ); |
'type'=>'int', |
| |
'maxlen'=>20, |
| $fdd["xdatetime"] = array( |
'nowrap'=>false, |
| 'name'=>'Xdatetime', |
'default'=>'00000000000000000000', |
| 'select'=>'T', |
'sort'=>true |
| 'type'=>'datetime', |
); |
| 'maxlen'=>19, |
} |
| 'nowrap'=>false, |
|
| 'sort'=>true |
if ($used_cols['float']) { |
| ); |
|
| |
$fdd["xfloat1"] = array( |
| $fdd["xtimestamp2"] = array( |
'name'=>'Xfloat1', |
| 'name'=>'Xtimestamp2', |
'select'=>'T', |
| 'select'=>'T', |
'type'=>'real', |
| 'type'=>'timestamp', |
'maxlen'=>12, |
| 'maxlen'=>2, |
'nowrap'=>false, |
| 'nowrap'=>false, |
'default'=>'0', |
| 'required'=>true, |
'sort'=>true |
| 'options'=>'R', |
); |
| 'sort'=>true |
|
| ); |
$fdd["xfloat1_z"] = array( |
| |
'name'=>'Xfloat1 Z', |
| $fdd["xtimestamp4"] = array( |
'select'=>'T', |
| 'name'=>'Xtimestamp4', |
'type'=>'real', |
| 'select'=>'T', |
'maxlen'=>12, |
| 'type'=>'timestamp', |
'nowrap'=>false, |
| 'maxlen'=>4, |
'default'=>'000000000000', |
| 'nowrap'=>false, |
'sort'=>true |
| 'required'=>true, |
); |
| 'options'=>'R', |
|
| 'sort'=>true |
$fdd["xfloat2"] = array( |
| ); |
'name'=>'Xfloat2', |
| |
'select'=>'T', |
| $fdd["xtimestamp6"] = array( |
'type'=>'real', |
| 'name'=>'Xtimestamp6', |
'maxlen'=>26, |
| 'select'=>'T', |
'nowrap'=>false, |
| 'type'=>'timestamp', |
'default'=>'0.000000000000000000000000', |
| 'maxlen'=>6, |
'sort'=>true |
| 'nowrap'=>false, |
); |
| 'required'=>true, |
|
| 'options'=>'R', |
$fdd["xfloat2_z"] = array( |
| 'sort'=>true |
'name'=>'Xfloat2 Z', |
| ); |
'select'=>'T', |
| |
'type'=>'real', |
| $fdd["xtimestamp8"] = array( |
'maxlen'=>26, |
| 'name'=>'Xtimestamp8', |
'nowrap'=>false, |
| 'select'=>'T', |
'default'=>'0.000000000000000000000000', |
| 'type'=>'timestamp', |
'sort'=>true |
| 'maxlen'=>8, |
); |
| 'nowrap'=>false, |
|
| 'required'=>true, |
$fdd["xdouble2"] = array( |
| 'options'=>'R', |
'name'=>'Xdouble2', |
| 'sort'=>true |
'select'=>'T', |
| ); |
'type'=>'real', |
| |
'maxlen'=>26, |
| $fdd["xtimestamp10"] = array( |
'nowrap'=>false, |
| 'name'=>'Xtimestamp10', |
'default'=>'0.000000000000000000000000', |
| 'select'=>'T', |
'sort'=>true |
| 'type'=>'timestamp', |
); |
| 'maxlen'=>10, |
|
| 'nowrap'=>false, |
$fdd["xdouble2_z"] = array( |
| 'required'=>true, |
'name'=>'Xdouble2 Z', |
| 'options'=>'R', |
'select'=>'T', |
| 'sort'=>true |
'type'=>'real', |
| ); |
'maxlen'=>26, |
| |
'nowrap'=>false, |
| $fdd["xtimestamp12"] = array( |
'default'=>'0.000000000000000000000000', |
| 'name'=>'Xtimestamp12', |
'sort'=>true |
| 'select'=>'T', |
); |
| 'type'=>'timestamp', |
|
| 'maxlen'=>12, |
$fdd["xreal2"] = array( |
| 'nowrap'=>false, |
'name'=>'Xreal2', |
| 'required'=>true, |
'select'=>'T', |
| 'options'=>'R', |
'type'=>'real', |
| 'sort'=>true |
'maxlen'=>26, |
| ); |
'nowrap'=>false, |
| |
'default'=>'0.000000000000000000000000', |
| $fdd["xtimestamp14"] = array( |
'sort'=>true |
| 'name'=>'Xtimestamp14', |
); |
| 'select'=>'T', |
|
| 'type'=>'timestamp', |
$fdd["xreal2_z"] = array( |
| 'maxlen'=>14, |
'name'=>'Xreal2 Z', |
| 'nowrap'=>false, |
'select'=>'T', |
| 'required'=>true, |
'type'=>'real', |
| 'options'=>'R', |
'maxlen'=>26, |
| 'sort'=>true |
'nowrap'=>false, |
| ); |
'default'=>'0.000000000000000000000000', |
| |
'sort'=>true |
| $fdd["xtime"] = array( |
); |
| 'name'=>'Xtime', |
} |
| 'select'=>'T', |
|
| 'type'=>'time', |
if ($used_cols['decimal']) { |
| 'maxlen'=>8, |
|
| 'nowrap'=>false, |
$fdd["xdecimal2"] = array( |
| 'sort'=>true |
'name'=>'Xdecimal2', |
| ); |
'select'=>'T', |
| |
'type'=>'real', |
| $fdd["xyear"] = array( |
'maxlen'=>28, |
| 'name'=>'Xyear', |
'nowrap'=>false, |
| 'select'=>'T', |
'default'=>'0.000000000000000000000000', |
| 'type'=>'year', |
'sort'=>true |
| 'maxlen'=>4, |
); |
| 'nowrap'=>false, |
|
| 'sort'=>true |
$fdd["xdecimal2_z"] = array( |
| ); |
'name'=>'Xdecimal2 Z', |
| |
'select'=>'T', |
| $fdd["xchar1"] = array( |
'type'=>'real', |
| 'name'=>'Xchar1', |
'maxlen'=>27, |
| 'select'=>'T', |
'nowrap'=>false, |
| 'type'=>'string', |
'default'=>'00.000000000000000000000000', |
| 'maxlen'=>1, |
'sort'=>true |
| 'nowrap'=>false, |
); |
| 'sort'=>true |
|
| ); |
$fdd["xnumeric2"] = array( |
| |
'name'=>'Xnumeric2', |
| $fdd["xchar255"] = array( |
'select'=>'T', |
| 'name'=>'Xchar255', |
'type'=>'real', |
| 'select'=>'T', |
'maxlen'=>28, |
| 'type'=>'string', |
'nowrap'=>false, |
| 'maxlen'=>255, |
'default'=>'0.000000000000000000000000', |
| 'nowrap'=>false, |
'sort'=>true |
| 'sort'=>true |
); |
| ); |
|
| |
$fdd["xnumeric2_z"] = array( |
| $fdd["xbit"] = array( |
'name'=>'Xnumeric2 Z', |
| 'name'=>'Xbit', |
'select'=>'T', |
| 'select'=>'T', |
'type'=>'real', |
| 'type'=>'int', |
'maxlen'=>27, |
| 'maxlen'=>1, |
'nowrap'=>false, |
| 'nowrap'=>false, |
'default'=>'00.000000000000000000000000', |
| 'sort'=>true |
'sort'=>true, |
| ); |
'mask'=>'[[ %s ]]', |
| |
); |
| $fdd["xbool"] = array( |
} |
| 'name'=>'Xbool', |
|
| 'select'=>'T', |
if ($used_cols['datetime']) { |
| 'type'=>'int', |
|
| 'maxlen'=>1, |
$fdd["xdate"] = array( |
| 'nowrap'=>false, |
'name'=>'Xdate', |
| 'sort'=>true |
'select'=>'T', |
| ); |
'type'=>'date', |
| |
'maxlen'=>10, |
| $fdd["xchar"] = array( |
'nowrap'=>false, |
| 'name'=>'Xchar', |
'sort'=>true |
| 'select'=>'T', |
); |
| 'type'=>'string', |
|
| 'maxlen'=>1, |
$fdd["xdatetime"] = array( |
| 'nowrap'=>false, |
'name'=>'Xdatetime', |
| 'sort'=>true |
'select'=>'T', |
| ); |
'type'=>'datetime', |
| |
'maxlen'=>19, |
| $fdd["xvarchar1"] = array( |
'nowrap'=>false, |
| 'name'=>'Xvarchar1', |
'sort'=>true, |
| 'select'=>'T', |
//'datemask'=>'dmY', |
| 'type'=>'string', |
//'daterange'=>array('start'=>1996,'end'=>2002) |
| 'maxlen'=>1, |
'date'=>array( |
| 'nowrap'=>false, |
'sequence' => 'DMY', |
| 'sort'=>true |
'label'=>array('month'=>'Month:'), |
| ); |
'format'=>'H', |
| |
'labeldivs'=>true, |
| $fdd["xvarchar255"] = array( |
'skip'=>true, |
| 'name'=>'Xvarchar255', |
) |
| 'select'=>'T', |
); |
| 'type'=>'string', |
|
| 'maxlen'=>255, |
$fdd["xtime"] = array( |
| 'nowrap'=>false, |
'name'=>'Xtime', |
| 'sort'=>true |
'select'=>'T', |
| ); |
'type'=>'time', |
| |
'maxlen'=>8, |
| $fdd["xtinytext"] = array( |
'nowrap'=>false, |
| 'name'=>'Xtinytext', |
'sort'=>true |
| 'select'=>'T', |
); |
| 'type'=>'blob', |
|
| 'maxlen'=>255, |
$fdd["xyear"] = array( |
| 'nowrap'=>false, |
'name'=>'Xyear', |
| 'textarea'=>array( |
'select'=>'T', |
| 'rows'=>5, |
'type'=>'year', |
| 'cols'=>50, |
'maxlen'=>4, |
| 'wrap'=>'virtual' |
'nowrap'=>false, |
| ), |
'sort'=>true |
| 'sort'=>true |
); |
| ); |
} |
| |
|
| $fdd["xblob"] = array( |
if ($used_cols['timestamp']) { |
| 'name'=>'Xblob', |
|
| 'select'=>'T', |
$fdd["xtimestamp2"] = array( |
| 'type'=>'blob', |
'name'=>'Xtimestamp2', |
| 'maxlen'=>65535, |
'select'=>'T', |
| 'nowrap'=>false, |
'type'=>'timestamp', |
| 'textarea'=>array( |
'maxlen'=>2, |
| 'rows'=>5, |
'nowrap'=>false, |
| 'cols'=>50, |
'required'=>true, |
| 'wrap'=>'virtual' |
'options'=>'R', |
| ), |
'sort'=>true |
| 'sort'=>true |
); |
| ); |
|
| |
$fdd["xtimestamp4"] = array( |
| $fdd["xtext"] = array( |
'name'=>'Xtimestamp4', |
| 'name'=>'Xtext', |
'select'=>'T', |
| 'select'=>'T', |
'type'=>'timestamp', |
| 'type'=>'blob', |
'maxlen'=>4, |
| 'maxlen'=>65535, |
'nowrap'=>false, |
| 'nowrap'=>false, |
'required'=>true, |
| 'textarea'=>array( |
'options'=>'R', |
| 'rows'=>5, |
'sort'=>true |
| 'cols'=>50, |
); |
| 'wrap'=>'virtual' |
|
| ), |
$fdd["xtimestamp6"] = array( |
| 'sort'=>true |
'name'=>'Xtimestamp6', |
| ); |
'select'=>'T', |
| |
'type'=>'timestamp', |
| $fdd["xmediumblob"] = array( |
'maxlen'=>6, |
| 'name'=>'Xmediumblob', |
'nowrap'=>false, |
| 'select'=>'T', |
'required'=>true, |
| 'type'=>'blob', |
'options'=>'R', |
| 'maxlen'=>16777215, |
'sort'=>true |
| 'nowrap'=>false, |
); |
| 'textarea'=>array( |
|
| 'rows'=>5, |
$fdd["xtimestamp8"] = array( |
| 'cols'=>50, |
'name'=>'Xtimestamp8', |
| 'wrap'=>'virtual' |
'select'=>'T', |
| ), |
'type'=>'timestamp', |
| 'sort'=>true |
'maxlen'=>8, |
| ); |
'nowrap'=>false, |
| |
'required'=>true, |
| $fdd["xmediumtext"] = array( |
'options'=>'R', |
| 'name'=>'Xmediumtext', |
'sort'=>true |
| 'select'=>'T', |
); |
| 'type'=>'blob', |
|
| 'maxlen'=>16777215, |
$fdd["xtimestamp10"] = array( |
| 'nowrap'=>false, |
'name'=>'Xtimestamp10', |
| 'textarea'=>array( |
'select'=>'T', |
| 'rows'=>5, |
'type'=>'timestamp', |
| 'cols'=>50, |
'maxlen'=>10, |
| 'wrap'=>'virtual' |
'nowrap'=>false, |
| ), |
'required'=>true, |
| 'sort'=>true |
'options'=>'R', |
| ); |
'sort'=>true |
| |
); |
| $fdd["xlongblob"] = array( |
|
| 'name'=>'Xlongblob', |
$fdd["xtimestamp12"] = array( |
| 'select'=>'T', |
'name'=>'Xtimestamp12', |
| 'type'=>'blob', |
'select'=>'T', |
| 'maxlen'=>16777215, |
'type'=>'timestamp', |
| 'nowrap'=>false, |
'maxlen'=>12, |
| 'textarea'=>array( |
'nowrap'=>false, |
| 'rows'=>5, |
'required'=>true, |
| 'cols'=>50, |
'options'=>'R', |
| 'wrap'=>'virtual' |
'sort'=>true |
| ), |
); |
| 'sort'=>true |
|
| ); |
$fdd["xtimestamp14"] = array( |
| |
'name'=>'Xtimestamp14', |
| $fdd["xlongtext"] = array( |
'select'=>'T', |
| 'name'=>'Xlongtext', |
'type'=>'timestamp', |
| 'select'=>'T', |
'maxlen'=>14, |
| 'type'=>'blob', |
'nowrap'=>false, |
| 'maxlen'=>16777215, |
'required'=>true, |
| 'nowrap'=>false, |
'options'=>'R', |
| 'textarea'=>array( |
'sort'=>true |
| 'rows'=>5, |
); |
| 'cols'=>50, |
} |
| 'wrap'=>'virtual' |
|
| ), |
if ($used_cols['char']) { |
| 'sort'=>true |
|
| ); |
$fdd["xchar1"] = array( |
| |
'name'=>'Xchar1', |
| $fdd["xenum"] = array( |
'select'=>'T', |
| 'name'=>'Xenum', |
'type'=>'string', |
| 'select'=>'T', |
'maxlen'=>1, |
| 'type'=>'string', |
'nowrap'=>false, |
| 'maxlen'=>5, |
'sort'=>true |
| 'nowrap'=>false, |
); |
| 'values'=>array('enum1','enum2','enum3'), |
|
| 'sort'=>true |
$fdd["xchar255"] = array( |
| ); |
'name'=>'Xchar255', |
| |
'select'=>'T', |
| $fdd["xset"] = array( |
'type'=>'string', |
| 'name'=>'Xset', |
'maxlen'=>255, |
| 'select'=>'M', |
'nowrap'=>false, |
| 'type'=>'set', |
'sort'=>true |
| 'maxlen'=>14, |
); |
| 'nowrap'=>false, |
|
| 'values'=>array('set0','set1','set2'), |
$fdd["xchar"] = array( |
| 'sort'=>true |
'name'=>'Xchar', |
| ); |
'select'=>'T', |
| |
'type'=>'string', |
| |
'maxlen'=>1, |
| |
'nowrap'=>false, |
| |
'sort'=>true |
| |
); |
| |
|
| |
$fdd["xvarchar1"] = array( |
| |
'name'=>'Xvarchar1', |
| |
'select'=>'T', |
| |
'type'=>'string', |
| |
'maxlen'=>1, |
| |
'nowrap'=>false, |
| |
'sort'=>true |
| |
); |
| |
|
| |
$fdd["xvarchar255"] = array( |
| |
'name'=>'Xvarchar255', |
| |
'select'=>'T', |
| |
'type'=>'string', |
| |
'maxlen'=>255, |
| |
'nowrap'=>false, |
| |
'sort'=>true |
| |
); |
| |
} |
| |
|
| |
if ($used_cols['text']) { |
| |
$fdd["xtinytext"] = array( |
| |
'name'=>'Xtinytext', |
| |
'select'=>'T', |
| |
'type'=>'blob', |
| |
'maxlen'=>255, |
| |
'nowrap'=>false, |
| |
'textarea'=>array( |
| |
'rows'=>5, |
| |
'cols'=>50, |
| |
'wrap'=>'virtual' |
| |
), |
| |
'sort'=>true |
| |
); |
| |
|
| |
$fdd["xblob"] = array( |
| |
'name'=>'Xblob', |
| |
'select'=>'T', |
| |
'type'=>'blob', |
| |
'maxlen'=>65535, |
| |
'nowrap'=>false, |
| |
'textarea'=>array( |
| |
'rows'=>5, |
| |
'cols'=>50, |
| |
'wrap'=>'virtual' |
| |
), |
| |
'sort'=>true |
| |
); |
| |
|
| |
$fdd["xtext"] = array( |
| |
'name'=>'Xtext', |
| |
'select'=>'T', |
| |
'type'=>'blob', |
| |
'maxlen'=>65535, |
| |
'nowrap'=>false, |
| |
'textarea'=>array( |
| |
'rows'=>5, |
| |
'cols'=>50, |
| |
'wrap'=>'virtual' |
| |
), |
| |
'sort'=>true |
| |
); |
| |
|
| |
$fdd["xmediumblob"] = array( |
| |
'name'=>'Xmediumblob', |
| |
'select'=>'T', |
| |
'type'=>'blob', |
| |
'maxlen'=>16777215, |
| |
'nowrap'=>false, |
| |
'textarea'=>array( |
| |
'rows'=>5, |
| |
'cols'=>50, |
| |
'wrap'=>'virtual' |
| |
), |
| |
'sort'=>true |
| |
); |
| |
|
| |
$fdd["xmediumtext"] = array( |
| |
'name'=>'Xmediumtext', |
| |
'select'=>'T', |
| |
'type'=>'blob', |
| |
'maxlen'=>16777215, |
| |
'nowrap'=>false, |
| |
'textarea'=>array( |
| |
'rows'=>5, |
| |
'cols'=>50, |
| |
'wrap'=>'virtual' |
| |
), |
| |
'sort'=>true |
| |
); |
| |
|
| |
$fdd["xlongblob"] = array( |
| |
'name'=>'Xlongblob', |
| |
'select'=>'T', |
| |
'type'=>'blob', |
| |
'maxlen'=>16777215, |
| |
'nowrap'=>false, |
| |
'textarea'=>array( |
| |
'rows'=>5, |
| |
'cols'=>50, |
| |
'wrap'=>'virtual' |
| |
), |
| |
'sort'=>true |
| |
); |
| |
|
| |
$fdd["xlongtext"] = array( |
| |
'name'=>'Xlongtext', |
| |
'select'=>'T', |
| |
'type'=>'blob', |
| |
'maxlen'=>16777215, |
| |
'nowrap'=>false, |
| |
'textarea'=>array( |
| |
'rows'=>5, |
| |
'cols'=>50, |
| |
'wrap'=>'virtual' |
| |
), |
| |
'sort'=>true |
| |
); |
| |
} |
| |
|
| |
if ($used_cols['enum']) { |
| |
$fdd["xbit"] = array( |
| |
'name'=>'Xbit', |
| |
'select'=>'T', |
| |
'type'=>'int', |
| |
'maxlen'=>1, |
| |
'nowrap'=>false, |
| |
'sort'=>true |
| |
); |
| |
|
| |
$fdd["xbool"] = array( |
| |
'name'=>'Xbool', |
| |
'select'=>'T', |
| |
'type'=>'int', |
| |
'maxlen'=>1, |
| |
'nowrap'=>false, |
| |
'sort'=>true |
| |
); |
| |
|
| |
|
| |
$fdd["xenum"] = array( |
| |
'name'=>'Xenum', |
| |
'select'=>'T', |
| |
'type'=>'string', |
| |
'maxlen'=>5, |
| |
'nowrap'=>false, |
| |
'values'=>array('enum1','enum2','enum3'), |
| |
'sort'=>true |
| |
); |
| |
|
| |
$fdd["xset"] = array( |
| |
'name'=>'Xset', |
| |
'select'=>'M', |
| |
'type'=>'set', |
| |
'maxlen'=>14, |
| |
'nowrap'=>false, |
| |
'values'=>array('set0','set1','set2'), |
| |
'sort'=>true |
| |
); |
| |
} |
| |
|
| |
|
| $opts['fdd'] = $fdd; |
$opts['fdd'] = $fdd; |
| |
|
| /* |
/* |
| table-level filter capability |
table-level filter capability |
| |
|
| if set, is included in the WHERE clause of any generated SELECT statement |
if set, is included in the WHERE clause of any generated SELECT statement |
| |
|
| example: |
example: |
| $opts['filters'] = "column1 like '%11%' AND column2<17"; |
$opts['filters'] = "column1 like '%11%' AND column2<17"; |
| ); |
); |
| */ |
*/ |
| |
|
| /* |
/* |
| Triggers are files that are included (via require) that perform |
Triggers are files that are included (via require) that perform |
| actions (before or after) X (inserts, updates, or deletes). |
actions (before or after) X (inserts, updates, or deletes). |
| |
|
| 'before' triggers are usually used to verify conditions prior to |
'before' triggers are usually used to verify conditions prior to |
| executing the main operation. |
executing the main operation. |
| |
|
| 'after' triggers are usually used to perform follow-on operations |
'after' triggers are usually used to perform follow-on operations |
| after the main operation. For example, to update secondary tables |
after the main operation. For example, to update secondary tables |
| to enforce referential integrity or to update aggregate tables. |
to enforce referential integrity or to update aggregate tables. |
| |
|
| The operation sequence is this: before, main, after. If any |
The operation sequence is this: before, main, after. If any |
| operation fails, not only should the next operation(s) not be |
operation fails, not only should the next operation(s) not be |
| executed, but the previous ones are 'rolled back' as if they |
executed, but the previous ones are 'rolled back' as if they |
| never happened. If a database is not able to do this, it is |
never happened. If a database is not able to do this, it is |
| not 'transaction-safe'. |
not 'transaction-safe'. |
| |
|
| Triggers are risky in basic MySQL as there is no native transaction |
Triggers are risky in basic MySQL as there is no native transaction |
| support--it is not transaction-safe by default. There are |
support--it is not transaction-safe by default. There are |
| transaction-safe table types in MySQL that can be conditionally built |
transaction-safe table types in MySQL that can be conditionally built |
| (see MySQL-Max), but phpMyEdit is currently not set up to support real |
(see MySQL-Max), but phpMyEdit is currently not set up to support real |
| transactions. What that means is that if an operation fails, the |
transactions. What that means is that if an operation fails, the |
| database may be left in an intermediate and invalid state. |
database may be left in an intermediate and invalid state. |
| |
|
| The programmer must understand and accept these risks prior to using |
The programmer must understand and accept these risks prior to using |
| the phpMyEdit triggers mechanism. |
the phpMyEdit triggers mechanism. |
| |
|
| If the triggers are used, they execute within the namespace or scope |
If the triggers are used, they execute within the namespace or scope |
| of the phpMyEdit class. |
of the phpMyEdit class. |
| |
|
| They _must_ return true or false to indicate success or failure. |
They _must_ return true or false to indicate success or failure. |
| */ |
*/ |
| |
|
| /* |
/* |
| $opts['triggers']['insert']['before']='comprehensiveTIB.inc'; |
$opts['triggers']['insert']['before']='comprehensiveTIB.inc'; |
| $opts['triggers']['insert']['after'] ='comprehensiveTIA.inc'; |
$opts['triggers']['insert']['after'] ='comprehensiveTIA.inc'; |
| $opts['triggers']['update']['before']='comprehensiveTUB.inc'; |
$opts['triggers']['update']['before']='comprehensiveTUB.inc'; |
| $opts['triggers']['update']['after'] ='comprehensiveTUA.inc'; |
$opts['triggers']['update']['after'] ='comprehensiveTUA.inc'; |
| $opts['triggers']['delete']['before']='comprehensiveTDB.inc'; |
$opts['triggers']['delete']['before']='comprehensiveTDB.inc'; |
| $opts['triggers']['delete']['after'] ='comprehensiveTDA.inc'; |
$opts['triggers']['delete']['after'] ='comprehensiveTDA.inc'; |
| */ |
*/ |
| |
|
| /* |
/* |
| logtable schema |
logtable schema |
| |
|
| CREATE TABLE changelog ( |
CREATE TABLE changelog ( |
| updated timestamp(14) NOT NULL, |
updated timestamp(14) NOT NULL, |
| user varchar(50) default NULL, |
user varchar(50) default NULL, |
| host varchar(255) NOT NULL default '', |
host varchar(255) NOT NULL default '', |
| operation varchar(50) default NULL, |
operation varchar(50) default NULL, |
| tab varchar(50) default NULL, |
tab varchar(50) default NULL, |
| rowkey varchar(255) default NULL, |
rowkey varchar(255) default NULL, |
| col varchar(255) default NULL, |
col varchar(255) default NULL, |
| oldval blob, |
oldval blob, |
| newval blob |
newval blob |
| ); |
); |
| |
|
| $opts['logtable']= 'changelog'; |
$opts['logtable']= 'changelog'; |
| */ |
*/ |
| |
|
| |
|
| # get the user's default language and use it if possible |
# get the user's default language and use it if possible |
| Riadok 864 require_once '../phpMyEdit.class.php'; |
|
| Riadok 926 require_once '../phpMyEdit.class.php'; |
|
| $MyForm = new phpMyEdit($opts); |
$MyForm = new phpMyEdit($opts); |
| |
|
| ?> |
?> |
| |
|
| </div> |
|
Platon Group <platon@platon.sk> http://platon.sk/
|
|