title: Use multiple databases and tables across an application in CakePHP
body: <p>For my job, I've build an web-based application with <strong>CodeIgniter</strong>. Now I want to rebuild this application in <strong>CakePHP</strong>, because I think it's a better framework which can do more and has more structure than my current framework.</p>
  
  <p>I've started with the basic tutorial on the CakePHP website to create a small blog application. That works fine. I also combined this with Twitter Bootstrap.
  Now I'm rebuilding my application.</p>
  
  <p><strong>First I explain what my application does.</strong> 
  It displays a list (overview) of data from the database.
  This database is located on localhost (MySQL) and is called "localdb1" (for this example).
  The tabel is called "sheets".
  This table contains data which I can use directly, but it also <strong>contains id's that refer to other databases</strong>.</p>
  
  <p>For example a field that is called customer, which contains the customer's number. The customer's name is stored in another database (ODBC), located on another host ("remotehost2"). For this example the database is called "remotedb2" and the customernames are stored in the table "customers" in the field "customername".</p>
  
  <p>For 2 days now, I'm struggling with the database system in CakePHP. As of the system uses name convention, it's not al clear for me. </p>
  
  <p><strong>What have I done:</strong></p>
  
  <ul>
  <li>I've read and search the CakePHP documentation on there website, wich I think is very usefull, but I can't find the answer.</li>
  <li>I've shearch the internet (by Google offcourse) for an answer. I found many different possible solutions, but non are suitable or give several errors with the database connection.</li>
  <li>I've search in the QA of Stackoverflow. Same as above. :(</li>
  </ul>
  
  <p><strong>How the result should look like:</strong></p>
  
  <p>I want a list of records from localdb1.sheets, but I don't want to display the customer's number, but I want the customer's name, which i found in the remote database remotedb2.customers and can be found by the customer's number</p>
  
  <p><strong>Can someone tell me how I should do that?</strong>
  The difficulty is, that I don't only want this, but I shall combine more databases and tables located on those 2 hosts. So I need a solution like a plugin (or if it's better a model) that is able to get content from the remotehost, or the localhost from other tables.</p>