Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6669533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:09:40+00:00 2026-05-26T03:09:40+00:00

The FuelPHP documentation does not include information on how to use the DB class

  • 0

The FuelPHP documentation does not include information on how to use the DB class to specify connections, which would allow me to then control multiple database connections. Any idea on how to accomplish this? Google search shows evidence of a Database_Connection class, but no information on how it might be used.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:09:41+00:00Added an answer on May 26, 2026 at 3:09 am

    First place to start would be reading https://github.com/fuel/core/blob/1.1/master/classes/database/connection.php .. It looks like you will have to write something similar to:

    $db2 = DB::instance( 'second_connection' );

    Where second_connection is configured as per example : http://fuelphp.com/docs/classes/database/introduction.html

    When you first time you execute that function, it will create new instance. Afterwards when you use the same line , it will just pick opened connection from the registry .. Essentially, it’s same old procedural code with global array of DB connections, just wrapped in fake OO code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using MVC pattern for web development. I use codeIgniter framework. I found http://fuelphp.com/
In FuelPHP when using Controller_REST I can't use \Response as REST controller has its
I'm using FuelPHP and the environment information cannot be passed to my command-line script
I am using MongoDB and FuelPHP. I successfully connected to MongoDB and can extract
As a former CodeIgniter user, I would really like to migrate to another framework.
I'm trying to undestand how FuelPHP was written.. And since I don't know OOP
Possible Duplicate: What does this symbol mean in PHP <?= Reference - What does
Is there any solution yet to make oil scaffolding (--crud) work with mongodb out
this is most likely a simple answer that i have overlooked.. I am trying
I'm running an online food journal where users can record journal entries. There are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.