List:General Discussion« Previous MessageNext Message »
From:David Lerer Date:April 8 2014 8:33pm
Subject:RE: Calling function, that operates on another database
View as plain text  
Chris, take a look at Federated tables
No, it is not as easy as Oracle's dblinks.

David Lerer | Director, Database Administration | Interactive | 605 Third Avenue, 12th Floor, New York, NY 10158
Direct: (646) 487-6522 | Fax: (646) 487-1569 | |

-----Original Message-----
From: bars0.bars0.bars0 [mailto:bars0.bars0.bars0@strippedom]
Sent: Tuesday, April 08, 2014 4:16 PM
Subject: Calling function, that operates on another database

Hi all.

I have standard select statement and on one column I want to run
function, that will connect to another database (same server).
Is this possible?

High level example:

SELECT db1.clients.client_id, getTurnover(db1.clients.client_id) FROM

AND getTurnover($id) body would be something like:

SELECT SUM(db2.turnover.amount) FROM db2.turnover WHERE
db2.turnover.client_id = $id;

So for some data, I need to make lookup to another database table.
Is this even possible?

Cheers, Chris.

MySQL General Mailing List
For list archives:
To unsubscribe:

The information contained in this e-mail and any attached 

documents may be privileged, confidential and protected from 

disclosure. If you are not the intended recipient you may not 

read, copy, distribute or use this information. If you have 

received this communication in error, please notify the sender 

immediately by replying to this message and then delete it 

from your system.
Calling function, that operates on another databasebars0.bars0.bars08 Apr
  • RE: Calling function, that operates on another databaseDavid Lerer8 Apr
  • Re: Calling function, that operates on another databaseLarry Martell8 Apr