juuser
Well-Known Member
Hi,
I have a secondary fabrik database connection. What is a good way of accessing this connection? This works for example in calc element:
$option = array();
$option['driver'] = 'mysql';
$option['host'] = 'hostname';
$option['user'] = 'username';
$option['password'] = 'password';
$option['database'] = 'databasename';
$option['prefix'] = '';
$db = JDatabaseDriver::getInstance( $option );
But I would'nt want to add this code to every calc element. If I change a password of database, I would need to change it in every element.
Thanks,
Martin
I have a secondary fabrik database connection. What is a good way of accessing this connection? This works for example in calc element:
$option = array();
$option['driver'] = 'mysql';
$option['host'] = 'hostname';
$option['user'] = 'username';
$option['password'] = 'password';
$option['database'] = 'databasename';
$option['prefix'] = '';
$db = JDatabaseDriver::getInstance( $option );
But I would'nt want to add this code to every calc element. If I change a password of database, I would need to change it in every element.
Thanks,
Martin