This page describes a general variable table in the database. The purpose of this table is to allow pieces of data to be stored without having to add additional tables or columns to the database.
The table will have the following columns:
id | name | value | setby | timestamp |
---|
Here is the table definition:
Code Block |
---|
CREATE TABLE IF NOT EXISTS `variable` (
`id` smallint(5) unsigned NOT NULL auto_increment,
`name` varchar(128) NOT NULL default '',
`value` longtext NOT NULL,
`setby` varchar(40) default NULL,
`timestamp` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
|
Code Block |
---|
my %kms_configuration = (
'ECU' => '192.168.22.33:1688',
'NCSU' => 'kms-server.ncsu.edu',
);
|
id | name | value | setby | timestamp |
---|---|---|---|---|
2 | kms-configuration | --- | new.pm:139 | 2009-05-26 11:35:36 |
Code Block |
---|
my my @contacts = ( { 'firstname' => 'Joe', 'lastname' => 'Doe', 'email' => ['joe@somewhere.org', 'jdoe22@unity.ncsu.edu'], 'employee_id' => 3342 }, { 'firstname' => 'Jane', 'lastname' => 'Doe', 'email' => ['jane@somewhere.org'], 'employee_id' => 7865 } ); |
id | name | value | setby | timestamp | 2 | kms-configuration | --- | new.pm:139 | 2009-05-26 11:35:36 |
---|---|---|---|---|---|---|---|---|---|
3 | contacts | --- | DataStructure.pm:554 | 2009-05-26 12:35:36 |