Search code examples
mysqljoincross-join

Is it possible to implement JOIN queries with 2 Mysql Databases?


I am working in Moodle and CodeIgnitor together in one project; a few of my tables are in moodle db and other tables are in another database.

Is it possible to implement JOIN queries with two Mysql Databases to fetch the data we require?


Solution

  • YES

    • both database are using the same daemon (meaning same port, same server)
    • user account has enough ACL to access both databases
    • if you are able to construct query yourself

    NO

    • certain framework / data modelling will restrict you do so (that's mean the CODE teaching you how to do the SQL, and you cannot against their rules (unless putting your hack)