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

  • SEARCH
  • Home
  • 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 6250719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:28:44+00:00 2026-05-24T13:28:44+00:00

I have a very quick question about how to utilise Zend_Db_Table with user specific

  • 0

I have a very quick question about how to utilise Zend_Db_Table with user specific database adapters.

I have an application that has a meta table that contains all application data, such as user logins, lookup tables and the like. Each client has then it’s own database for their data.

I have in my Zend Project in the model folder another folder called meta. All Zend_Db_Tables that are used for the application are stored here. All Zend_Db_Table objects that interact with the clients database are in the models folder direct.

  /application
  |
  |models/
  |- UserTable.php
  |- AnotherTable.php
  |- meta/
  |- - LookupTable1.php
  |- - LoginTable.php

What is the best way of injecting the user dbadapter, which contains the client database connection, into all the Zend_Db_Table object that sit in the modles folder but not in the meta sub folder?

The meta tables need to be accessable throughout the application, so changing the default adapter in the Zend_Registry won’t work.

Any suggestions?

Thanks,

Grant

  • 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-24T13:28:45+00:00Added an answer on May 24, 2026 at 1:28 pm
    $userTable = new Model_DbTable_Users(array('db'=>$dbadapter));
    

    another way

    $userTable = new Model_DbTable_Users();
    $userTable->setDefaultAdapter($dbadapter);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quick question: I have a very busy form going on that I have developed
I have a quick question that hopefully someone has worked through before. In the
Alrighty then, howdy first off; quick question I have a form that has multiple
quick and very basic newbie question. If i have list of dictionaries looking like
i have a question about basic mysql database optimisation. I have 3 tables, Articles,
I have a very simple question about menu control in Android. I'm writing a
I have a quick question that I'm sure some of you would have an
I have a quick question that I could not figure out in the docs
I have a quick question about a preg_replace problem I have. I am just
I have a quick question about mysql_real_escape_string. Where should I use it? I have

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.