[[PageOutline(2-5,Contents,pullout)]] = Maintain list of static data as key-value pairs == Description This plugin can be used to manage constants (key/value pairs) stored in the database, which can then be used in report queries. It adds a new administration control panel from which the key/value pairs can be maintained. == Bugs/Feature Requests Existing bugs and feature requests for SqlConstantsPlugin are [report:9?COMPONENT=SqlConstantsPlugin here]. If you have any issues, create a [/newticket?component=SqlConstantsPlugin new ticket]. [[TicketQuery(component=SqlConstantsPlugin,group=type,format=progress)]] == Download Download the zipped source from [export:sqlconstantsplugin here]. == Source You can check out SqlConstantsPlugin from [/svn/sqlconstantsplugin here] using Subversion, or [source:sqlconstantsplugin browse the source] with Trac. == Installation General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. == Configuration When the plugin is installed, add a table like this to the database: {{{#!sql CREATE TABLE `constants` ( `constant` VARCHAR(255) NOT NULL, `stringval` VARCHAR(255) DEFAULT NULL, `intval` INT(11) DEFAULT NULL, `floatval` FLOAT DEFAULT NULL, PRIMARY KEY (`constant`) ); }}} You can then use this in report queries. The `stringval` column will always be stored. Also, `intval` and `floatval` will contain the int/float equivalent if possible, ie the input could be cast to an INT. Visit the administration panel to update constants. == Recent Changes [[ChangeLog(sqlconstantsplugin, 3)]] == Author/Contributors '''Author:''' [wiki:optilude] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''