[eluser]trumpetnl[/eluser]
If you use the full database.table format name it can work. I tried it on my MySQL database.
i created 3 databases
- oeps1
-> naw(recid(int), name(varchar(60))
- oeps2
-> adressen(recid(int), woonplaats(varchar(60))
- oeps3
-> straten(recid(int), straatnaam(varchar(60))
in my database.php i configured my dbuser and password, database is left empty
Then i used this controller:
Code:
<?php
class Dbproeftuin extends Controller {
function dbproeftuin() {
parent::Controller();
}
function index() {
$query1 = $this->db->get('oeps1.naw');
$query2 = $this->db->get('oeps2.adressen');
$query3 = $this->db->get('oeps3.straten');
$naw = $query1->row();
$adressen = $query2->row();
$straten = $query3->row();
echo 'Recid : ' . $naw->recid . br(1);
echo 'Naam : ' . $naw->name . br(1);
echo 'Straat: ' . $straten->straatnaam . br(1);
echo 'Plaats: ' . $adressen->woonplaats . br(1);
}
}
Only thing to consider is, you need a database-user that can access all database you want to use.
I hope this helps you, it was fun to explore :-)
//