Db db config
With db config we can use many config sets for each task we have on hand. For example, we can use mySql main database to store credential information on users and use database number 2 to get data about products items that will show on the site. Or even use mongoDb to save information about statistics.
So on db settings we will have leading array that will tell us which task we are on, like this: $cfg['db']['main']
and $cfg['db']['sub']
.
main - hostName set server address that holds the mySql self::$cfg['db']['main']['hostName '];
main - userName set database user name self::$cfg['db']['main']['userName '];
main - password set database password self::$cfg['db']['main']['password '];
main - database set database name self::$cfg['db']['main']['database '];
main - tablePrefix set table prefix self::$cfg['db']['main']['tablePrefix '];
main - timeZone set database time zone self::$cfg['db']['main']['timeZone '];
main - dateFormat set database date format self::$cfg['db']['main']['dateFormat '];
main - timeFormat set database time format self::$cfg['db']['main']['timeFormat '];