lcollong
FabriKant d'applications web
Hi,
Migrating a site, my joomla was pointing on a new db while the fabrik connection was still on the old server. I thought it was a good solution at least not disturbing one, untill I realized that fabrik itself was using the data from the connection panel to reach its db but the php scripts used inside Fabrik (onAfterProcess, email condition, etc..) was connecting to the Joomla db.
Actually, all my scripts are using the common J framework to reach the database :
$db =& JFactory::getDBO();
But this may break the whole application if for a reason or another, one decide to put Fabrik's tables on another DB than the J! one.
So, what would be the universal syntax to be sure to use the "default" fabrik's connection while accessing the database from embedded php scripts ?
Would it be a good practice to declare a connection (default) for the "other than joomla" data and a another one to the J! base ? So the scripts will use the default connection to reach the "private data" and the other one to reach J! data such as #__users for example. Could both connections being the same most of the time without trouble ?
The idea is to be able to move the data on a separate MySQL server or db than the J! one just changing the default connection.
Migrating a site, my joomla was pointing on a new db while the fabrik connection was still on the old server. I thought it was a good solution at least not disturbing one, untill I realized that fabrik itself was using the data from the connection panel to reach its db but the php scripts used inside Fabrik (onAfterProcess, email condition, etc..) was connecting to the Joomla db.
Actually, all my scripts are using the common J framework to reach the database :
$db =& JFactory::getDBO();
But this may break the whole application if for a reason or another, one decide to put Fabrik's tables on another DB than the J! one.
So, what would be the universal syntax to be sure to use the "default" fabrik's connection while accessing the database from embedded php scripts ?
Would it be a good practice to declare a connection (default) for the "other than joomla" data and a another one to the J! base ? So the scripts will use the default connection to reach the "private data" and the other one to reach J! data such as #__users for example. Could both connections being the same most of the time without trouble ?
The idea is to be able to move the data on a separate MySQL server or db than the J! one just changing the default connection.