= SQL Constants = == Description == This plugin adds a new administration control panel that can be used to manage constants (key/value pairs) stored in the database. These can then be used in report queries. == Bugs/Feature Requests == Existing bugs and feature requests for SqlConstantsPlugin are [report:9?COMPONENT=SqlConstantsPlugin here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=SqlConstantsPlugin&owner=optilude new ticket]. == Download == Download the zipped source from [download:sqlconstantsplugin here]. == Source == You can check out SqlConstantsPlugin from [http://trac-hacks.org/svn/sqlconstantsplugin here] using Subversion, or [source:sqlconstantsplugin browse the source] with Trac. == Example == Simply install the plugin as normal, and add a table like this to the database: {{{ 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. intval and floatval will contain the int/float equivalent if possible (i.e. 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]] '''Contributors:'''