forked from rho_n/hpr_generator
Add database type constant for use in templates
This is used to select which database specific SQL query to use.
This commit is contained in:
parent
4e8edf2640
commit
cb881558ca
@ -198,6 +198,7 @@ sub get_template_html (\%@) {
|
|||||||
PRE_CHOMP => 1,
|
PRE_CHOMP => 1,
|
||||||
POST_CHOMP => 1,
|
POST_CHOMP => 1,
|
||||||
CONSTANTS => {
|
CONSTANTS => {
|
||||||
|
database => $_[0]{database},
|
||||||
driver => $_[0]{driver},
|
driver => $_[0]{driver},
|
||||||
user => $_[0]{user},
|
user => $_[0]{user},
|
||||||
password => $_[0]{password},
|
password => $_[0]{password},
|
||||||
|
1
site.cfg
1
site.cfg
@ -2,6 +2,7 @@
|
|||||||
# with the database.
|
# with the database.
|
||||||
# dbi:<driver name [SQLite, CSV, ADO, mSQL, etc.]>:<database name>
|
# dbi:<driver name [SQLite, CSV, ADO, mSQL, etc.]>:<database name>
|
||||||
[DBI]
|
[DBI]
|
||||||
|
database: mysql
|
||||||
driver: dbi:mysql:database=hpr_hpr:hostname=localhost
|
driver: dbi:mysql:database=hpr_hpr:hostname=localhost
|
||||||
user: hpr-generator
|
user: hpr-generator
|
||||||
password: zBozqN-Z2zNAz
|
password: zBozqN-Z2zNAz
|
||||||
|
Loading…
Reference in New Issue
Block a user