Gossamer Forum
Home : Products : DBMan : Customization :

read a db from a config file.

Quote Reply
read a db from a config file.
In my jersey config file I placed these lines.


# Full path and file name of the Player databace.
$player_file = $db_script_path . "/players.db";


# Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = (
Type => 'Standard,Custom',
Team => 'Bengals,Throw Back,Reds',
Size => '40,44,48,50,52,54,56,60,Kids Sm,Kids Med,Kids Lg,Kids Xl,SM,MED,LG,1X,2X,3X',
Color => 'Black,Black Out,Red,White,Grey,Camo,All Star,Orange,Team Colors,White Special',
Gender => 'Adult,Woman,Youth',
Status => 'Order,Ready to Deliver,Out for Delivery,Delivered,Returned,On Order,Available',
'Promotion' => 'Basketball,Softball',
'Pdate' => '2015,2016,2017,2018,2019,2020',
and this line ==> Player => '$player_file'
);






Then I cerated a file called "players.db. the information in this file is below.


Geno Adkins,Johnny Bench,Giovanni Bernard,Tyler Boyd,Vontez Burfict,Davey Conception,Andy Dalton,Dalton Black Out,Darquese Dennard,Tyler Eifert,Boomer Esiason,Scooter Gennett,A.J. Green,Billy Hamilton,Dre Kirkpatrick,Rey Maleluga,Joe Mixon,Joe Morgan,Anthony Munoz,Tony Perez,Vinney Rey,Pete Rose,John Ross,Joey Votto,Yasiel Puig,Matt Kemp,Sam Hubbard,Amir Garrett,William Jackson




How can I get the config file to read the players.db?
I would like to do this so I can edit the players.db and not mess with the config file.


Thank you,