• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DMZ & Multiple DBs !! any idea?

#1
[eluser]7amza[/eluser]
hey
im using the dmz library and i want to use multiple databases .
i have read the config section in the dmz library user guide but i didn't understood it very well , i read the CI user guide multiple databases section guide as well as and all goes good with it.
thank you .

#2
[eluser]WanWizard[/eluser]
In the config/database.php you can define multiple named database connection.

Without extra configuration, DataMapper uses whatever you have defined as 'default' in this configuration.

You can override that for all DataMapper models by setting the config value 'db_params' to another database configuration in config/datamapper.php.

If you want a per-model override, you can add this to a model:
Code:
/**
* override the database connections with this option
*/
var $db_params = 'db_config_name';


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.