Connecting to Multiple Databases in Joomla Using JDatabase

It is possible to create connections to multiple databases using the JDatabase::getInstance() method. The following link points to a tutorial that describes how to create a helper file that makes it easy to create multiple JDatabase instances that point to different databases. You can create the database instances in the following manner using the custom helper class.

$db = JFactory::getDBO();
$db2 = MyDataHelper::getDBO2();
$db3 = MyDataHelper::getDBO3();

You can still get the default database object normally using JFactory.

The full tutorial on creating this helper is found here.

Leave a comment


  1. Hmm it seems like your site atte my first comment
    (it was super long) so I guess I’ll just sum it up what I had written and say, I’m
    thoroughly enjoying your blog. I ttoo am an aspiring blog writer but
    I’m still new to thhe whole thing. Do yoou have any suggestions for newbije blog writers?
    I’d really appreciwte it.

  2. I know this website gives quality depending articles or reviews and
    extra information, is there any other web site which offers such
    information in quality?

  3. With havin so much content do you ever run into any issues of plagorism or
    copyright infringement? My website has a lot of unique content I’ve either
    authored myself or outsourced but it looks like a
    lot of it is popping it up all over the web without my agreement.
    Do you know any methods to help reduce content
    from being stolen? I’d definitely appreciate it.

  4. Hello there! This is my first visit to your blog! We are a team of volunteers and starting
    a new project in a community in the same niche. Your blog provided us
    useful information to work on. You have done a extraordinary job!

  5. The winnings of roulette took a long time to transfer to the winners and claiming of bets from sites
    such as Jackpotjoy had become very insignificant. There are certain things which people need to take into account while selecting the Chat rooms.
    The website is now a global phenomenon with bands using it to webcast performances and many celebrities logging on to chat with individuals
    across the world.

  6. México se transforma permitiendo que las mineras
    puedan explotar el gas no convencional en sus territorios. México tiene
    un potencial cercano a 683 billones de pies cúbicos de
    gas no convencional que se encuentra en rocas, de los cuales 681 billones son yacimientos de
    shale gas (11 veces mayor que las reservas remanentes de gas natural del
    país), y otros dos billones en gas grisú, un tipo de hidrocarburo asociado con las minas de carbón. Asimismo, la minería en los fondos marinos es una alternativa a considerar tras el desarrollo de nuevos
    equipos y métodos llegando a kilómetros de
    La evaluación e interpretación de la información oportuna representa una ventaja
    competitiva invaluable que mejora el entorno jurídico, social, operacional
    y administrativo.

  7. I have received many discounts, credits, and free services as a result
    of this thinking. Think about how your restaurant accords with other restaurants like it.
    A more sophisticated application is converting
    bookcases to coffins.

  8. Unlike working in an office, there are few people to talk to and exchange ideas.
    Dil Hai Ke Manta Nahin 1991 It Happened One Night 1934. The school is established by Nakul Dev Mahajan to provide dance
    classes in Los Angeles, California.

  9. I do agree with all the ideas you have presented
    in your post. They’re really convincing and can certainly work.
    Nonetheless, the posts are too quick for starters.
    May just you please extend them a bit from subsequent time?
    Thank you for the post.

  10. Wonderful goods from you, man. I have understand
    your stuf previous to and you’re just too fantastic. I actually like what you’ve acquired here,
    certainly like what you are saying and the way in which you say
    it. You make it entertaining and you still take care oof to kerep it smart.
    I can not wait to read much more from you.
    This is actually a wonderful website.

  11. Right now it looks like Drupal is the preferred blogging platform out there right
    now. (from what I’ve read) Is that what you are using on your

  12. This piece of writing will assist the internet users for building up
    new web site or even a blog from start to end.

  13. I am in fact thankful to the holder of this web site who has shared this
    impressive post at at this time.

  14. Piece of writing writing is also a excitement, if you
    be acquainted with after that you can write if not it is
    complex to write.

  15. Hello to every body, it’s my first go to see of this weblog; this weblog includes amazing and truly fine
    data in support of visitors.

  16. Thank you for the auspicious writeup. It if truth be told was a entertainment account it.
    Loook advanced to far brought agreeable from you!
    By the way, how could we communicate?

  17. A motivating discussion is worth comment. There’s no doubt that that you should publish more
    on this subject, it may not be a taboo subject but
    generally folks don’t speak about such issues.
    To the next! Many thanks!!

  18. Excellent site you have here.. It’s difficult to find good quality writing like
    yours nowadays. I truly appreciate people like you!
    Take care!!

  19. Fantastic goods from you, man. I’ve remember your stuff
    prior to and you are simply extremely magnificent.
    I really like what you have received here, really like what you
    are stating and the way in which in which you assert it. You’re making
    it entertaining and you still care for to keep it smart.
    I can’t wait to read much more from you. This is really
    a tremendous website.

  20. It’s hard to come by educated people for this subject, but you seem like
    you know what you’re talking about! Thanks

  21. It’s really a cool and helpful piece of information. I’m satisfied that you shared
    this helpful information with us. Please stay us up to
    date like this. Thank you for sharing.

  22. This paragraph provides clear idea for the new people of blogging, that in fact how
    to do blogging and site-building.

  23. We are a bunch of volunteers and opening a brand new
    scheme in our community. Your website provided us with valuable information to work on. You have performed
    an impressive job and our entire neighborhood can be grateful to you.

  24. Wonderful, what a weblog it is! This webpage provides useful information to us, keep it up.

  25. Nice post. I was checking constantly this weblog
    and I am impressed! Extremely helpful info particularly
    the last section :) I handle such information much. I used to be seeking
    this particular information for a long time.

    Thank you and good luck.

  26. It was cheap, popular, easy to use and pretty intuitive. I have personally observed that most of small business
    owners don’t have enough time to spend on preparing financial statements and filing tax returns.
    To meet this need, you always need to consult on strategies that can help you manage each aspect of
    your business so that it remains in competition.

  27. Thank you a lot for sharing this with all of us you actually
    understand what you are talking about! Bookmarked. Kindly additionally seek advice from my
    website =). We could have a hyperlink trade contract among us

  28. Pretty section of content. I just stumbled upon your site and in accession capital
    to assert that I acquire in fact enjoyed account your blog posts.

    Any way I’ll be subscribing to your feeds and even I achievement you access consistently rapidly.