Page 1 of 1

nuBuilder and work with 2 databases

Posted: Mon Aug 26, 2013 12:17 pm
by fuzzyq
Hello,

in my project i have 2 databases

first one is base with data from another OpenSource software (ProcessMaker). ProcessMaker save report to table in database.

second database is database from nubuilder. And now i want to get data from first database (Processmaker) and insert to nu database.

I paste this code:

Code: Select all

$connection = @mysql_connect('localhost', 'root', 'root') 
or die('Brak połączenia z serwerem MySQL.<br />Błąd: '.mysql_error()); 
echo "Udało się połączyć z serwerem!<br />"; 

$db = @mysql_select_db('wf_workflow', $connection) 
or die('Nie mogę połączyć się z bazą danych<br />Błąd: '.mysql_error()); 
echo "Udało się połączyć z bazą dancych!"; 
mysql_close($connection);
to before browse in form and when i run this form i see only white screen nothing happens.

Can nuBuilder work with 2 databases?

Ragards

Re: nuBuilder and work with 2 databases

Posted: Mon Aug 26, 2013 10:31 pm
by massiws
fuzzyq,
no, you can't do this in Before Browse.
NuBuilder framework require one database to manage their system tables to open forms, etc.

To manage other DB tables, you may build a procedure, or an external script, to copy the tables you need from ProcessMaker DB to nuBuilder DB.

Hope this helps,
Max