Home » RADICORE development » Transaction Patterns » Virtual Private Database and List 2 pattern (Entries from child table not visible)
|
|
Re: Virtual Private Database and List 2 pattern [message #4196 is a reply to message #4195] |
Tue, 03 June 2014 05:42   |
htManager
Messages: 456 Registered: May 2014
|
Senior Member |
|
|
Here they are.
Parent table:
<?php
// file created on June 2, 2014, 12:22 pm
// field specifications for table htm.htm_db_vereine
$fieldspec['rdcaccount_id'] = array('type' => 'integer',
'type_native' => 'int',
'size' => 10,
'minvalue' => 0,
'maxvalue' => 4294967295,
'pkey' => 'y',
'required' => 'y',
'default' => '1',
'nodisplay' => 'y',
'nosearch' => 'y');
$fieldspec['verbaende_art_id'] = array('type' => 'string',
'size' => 5,
'pkey' => 'y',
'required' => 'y',
'default' => 'LV',
'uppercase' => 'y',
'control' => 'dropdown',
'optionlist' => 'verbaende_art_id');
$fieldspec['verbaende_kuerzel'] = array('type' => 'string',
'size' => 10,
'pkey' => 'y',
'required' => 'y',
'uppercase' => 'y',
'control' => 'dropdown',
'optionlist' => 'verbaende_kuerzel');
$fieldspec['vereine_kuerzel'] = array('type' => 'string',
'size' => 20,
'pkey' => 'y',
'required' => 'y',
'uppercase' => 'y');
$fieldspec['node_id'] = array('type' => 'integer',
'type_native' => 'int',
'size' => 5,
'minvalue' => 0,
'maxvalue' => 4294967295,
'default' => '0');
$fieldspec['vereine_name'] = array('type' => 'string',
'size' => 255,
'required' => 'y');
$fieldspec['vereine_name_zusatz'] = array('type' => 'string',
'size' => 255);
$fieldspec['vereine_strasse'] = array('type' => 'string',
'size' => 255);
$fieldspec['vereine_lkz'] = array('type' => 'string',
'size' => 10);
$fieldspec['vereine_plz'] = array('type' => 'string',
'size' => 10);
$fieldspec['vereine_ort'] = array('type' => 'string',
'size' => 100);
$fieldspec['vereine_telefon'] = array('type' => 'string',
'size' => 30);
$fieldspec['vereine_fax'] = array('type' => 'string',
'size' => 30);
$fieldspec['vereine_email'] = array('type' => 'string',
'size' => 100);
$fieldspec['vereine_website'] = array('type' => 'string',
'size' => 255);
$fieldspec['created_date'] = array('type' => 'datetime',
'size' => 20,
'required' => 'y',
'default' => '2014-01-01 00:00:00',
'autoinsert' => 'y',
'noedit' => 'y',
'nosearch' => 'y');
$fieldspec['created_user'] = array('type' => 'string',
'size' => 16,
'required' => 'y',
'autoinsert' => 'y',
'noedit' => 'y',
'nosearch' => 'y');
$fieldspec['revised_date'] = array('type' => 'datetime',
'size' => 20,
'autoupdate' => 'y',
'noedit' => 'y',
'nosearch' => 'y');
$fieldspec['revised_user'] = array('type' => 'string',
'size' => 16,
'autoupdate' => 'y',
'noedit' => 'y',
'nosearch' => 'y');
// primary key details
$this->primary_key = array('rdcaccount_id',
'verbaende_art_id',
'verbaende_kuerzel',
'vereine_kuerzel');
// unique key details
$this->unique_keys = array();
// child relationship details
$this->child_relations[] = array('child' => 'htm_db_saisons',
'type' => 'RES',
'fields' => array('rdcaccount_id' => 'rdcaccount_id',
'verbaende_art_id' => 'verbaende_art_id',
'verbaende_kuerzel' => 'verbaende_kuerzel',
'vereine_kuerzel' => 'vereine_kuerzel'));
// parent relationship details
$this->parent_relations[] = array('parent' => 'htm_db_verbaende',
'parent_field' => 'verbaende_name',
'fields' => array('rdcaccount_id' => 'rdcaccount_id',
'verbaende_art_id' => 'verbaende_art_id',
'verbaende_kuerzel' => 'verbaende_kuerzel'));
$this->parent_relations[] = array('parent' => 'mnu_account',
'dbname' => 'menu',
'subsys_dir' => 'menu',
'parent_field' => 'rdcaccount_id',
'fields' => array('rdcaccount_id' => 'rdcaccount_id'));
// determines if database updates are recorded in an audit log
$this->audit_logging = TRUE;
// default sort sequence
$this->default_orderby = '';
// alternative language options
$this->alt_language_table = '';
$this->alt_language_cols = '';
// alias names
$this->nameof_start_date = '';
$this->nameof_end_date = '';
// finished
?>
Child table:
<?php
// file created on June 1, 2014, 11:59 am
// field specifications for table htm.htm_db_saisons
$fieldspec['rdcaccount_id'] = array('type' => 'integer',
'type_native' => 'int',
'size' => 10,
'minvalue' => 0,
'maxvalue' => 4294967295,
'pkey' => 'y',
'required' => 'y',
'default' => '1',
'nodisplay' => 'y',
'nosearch' => 'y');
$fieldspec['verbaende_art_id'] = array('type' => 'string',
'size' => 5,
'pkey' => 'y',
'required' => 'y',
'uppercase' => 'y');
$fieldspec['verbaende_kuerzel'] = array('type' => 'string',
'size' => 10,
'pkey' => 'y',
'required' => 'y',
'uppercase' => 'y');
$fieldspec['vereine_kuerzel'] = array('type' => 'string',
'size' => 20,
'pkey' => 'y',
'required' => 'y',
'uppercase' => 'y');
$fieldspec['saison_id'] = array('type' => 'string',
'size' => 10,
'pkey' => 'y',
'required' => 'y');
$fieldspec['saison_start'] = array('type' => 'date',
'size' => 12,
'required' => 'y',
'default' => '2014-07-01');
$fieldspec['saison_ende'] = array('type' => 'date',
'size' => 12,
'required' => 'y',
'default' => '2015-06-30');
$fieldspec['created_date'] = array('type' => 'datetime',
'size' => 20,
'required' => 'y',
'default' => '2014-01-01 00:00:00',
'autoinsert' => 'y',
'noedit' => 'y',
'nosearch' => 'y');
$fieldspec['created_user'] = array('type' => 'string',
'size' => 16,
'required' => 'y',
'autoinsert' => 'y',
'noedit' => 'y',
'nosearch' => 'y');
$fieldspec['revised_date'] = array('type' => 'datetime',
'size' => 20,
'autoupdate' => 'y',
'noedit' => 'y',
'nosearch' => 'y');
$fieldspec['revised_user'] = array('type' => 'string',
'size' => 16,
'autoupdate' => 'y',
'noedit' => 'y',
'nosearch' => 'y');
// primary key details
$this->primary_key = array('rdcaccount_id',
'saison_id',
'verbaende_art_id',
'verbaende_kuerzel',
'vereine_kuerzel');
// unique key details
$this->unique_keys = array();
// child relationship details
$this->child_relations[] = array('child' => 'htm_db_mannschaften',
'type' => 'RES',
'fields' => array('rdcaccount_id' => 'rdcaccount_id',
'saison_id' => 'saison_id',
'verbaende_art_id' => 'verbaende_art_id',
'verbaende_kuerzel' => 'verbaende_kuerzel',
'vereine_kuerzel' => 'vereine_kuerzel'));
// parent relationship details
$this->parent_relations[] = array('parent' => 'htm_db_vereine',
'parent_field' => 'vereine_name',
'fields' => array('rdcaccount_id' => 'rdcaccount_id',
'verbaende_art_id' => 'verbaende_art_id',
'verbaende_kuerzel' => 'verbaende_kuerzel',
'vereine_kuerzel' => 'vereine_kuerzel'));
$this->parent_relations[] = array('parent' => 'mnu_account',
'dbname' => 'menu',
'subsys_dir' => 'menu',
'parent_field' => 'rdcaccount_id',
'fields' => array('rdcaccount_id' => 'rdcaccount_id'));
// determines if database updates are recorded in an audit log
$this->audit_logging = TRUE;
// default sort sequence
$this->default_orderby = '';
// alternative language options
$this->alt_language_table = '';
$this->alt_language_cols = '';
// alias names
$this->nameof_start_date = '';
$this->nameof_end_date = '';
// finished
?>
|
|
|
|
Re: Virtual Private Database and List 2 pattern [message #4198 is a reply to message #4197] |
Tue, 03 June 2014 08:33   |
htManager
Messages: 456 Registered: May 2014
|
Senior Member |
|
|
Sorry, do you mean the table structure? I sometimes do not know the exact meaning in german.
I also had some problems with difficult character sets, so I changed all character sets to utf8_unicode_ci.
Here is the SQL statement:
CREATE TABLE IF NOT EXISTS `htm_db_saisons` (
`rdcaccount_id` int(10) unsigned NOT NULL DEFAULT '1',
`verbaende_art_id` varchar(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`verbaende_kuerzel` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`vereine_kuerzel` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`saison_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`saison_start` date NOT NULL DEFAULT '2014-07-01',
`saison_ende` date NOT NULL DEFAULT '2015-06-30',
`created_date` datetime NOT NULL DEFAULT '2014-01-01 00:00:00',
`created_user` varchar(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`revised_date` datetime DEFAULT NULL,
`revised_user` varchar(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`rdcaccount_id`,`verbaende_art_id`,`verbaende_kuerzel`,`ver eine_kuerzel`,`saison_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `htm_db_vereine`
--
CREATE TABLE IF NOT EXISTS `htm_db_vereine` (
`rdcaccount_id` int(10) unsigned NOT NULL DEFAULT '1',
`verbaende_art_id` varchar(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'LV',
`verbaende_kuerzel` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`vereine_kuerzel` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`node_id` int(5) unsigned DEFAULT '0',
`vereine_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`vereine_name_zusatz` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`vereine_strasse` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`vereine_lkz` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`vereine_plz` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`vereine_ort` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`vereine_telefon` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`vereine_fax` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`vereine_email` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`vereine_website` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`created_date` datetime NOT NULL DEFAULT '2014-01-01 00:00:00',
`created_user` varchar(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`revised_date` datetime DEFAULT NULL,
`revised_user` varchar(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`rdcaccount_id`,`verbaende_art_id`,`verbaende_kuerzel`,`ver eine_kuerzel`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Jul 05 07:47:20 EDT 2025
Total time taken to generate the page: 0.02188 seconds
|