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 8636401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:13:25+00:00 2026-06-12T10:13:25+00:00

Using Zend DB. I am trying to figure out how to write this query

  • 0

Using Zend DB. I am trying to figure out how to write this query using the DB Class.

select 
   org.orgid
   org.role
   user.userid
   user.firstname
from orgTable org
join userTable user on org.userid = user.userid
where org.orgid = 'generated-id'

from the documents I understand or think I understand how to do it with one definition using an AS like condition, but even then Im still not sure. Eventually this will branch out into a multi table join, based on cross table conditions so not sure how to achieve this to begin with.

  • 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-06-12T10:13:27+00:00Added an answer on June 12, 2026 at 10:13 am

    I think this is what are you looking for

    $db = Zend_Db::factory( ...options... );
    
    $select = $db->select()
                 ->from(array('org' => 'orgTable'),
                        array( 
                            'orgid' => 'org.orgid', 
                            'role'  =>'org.role',
                            'userid'  =>'user.userid',
                            'firstname' =>'user.firstname'
                        ))
                 ->join(array('user' => 'userTable'),
                        'org.userid = user.userid',array())
                ->where('org.orgid = ?',$generated_id);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to replicate this query using zend framework: SELECT activitytype.description, activity.datecompleted FROM
I'm using Doctrine 2 in Zend. I'm trying to figure out how to access
I am trying to code the following query using Zend_Db api's: select * from
I'm trying to write a unit test for a controller using Zend and PHPUnit
I'm trying to create a table of information in a database query using Zend
I am using Zend Framework and have been trying to do a joined query
I'm using Zend Framework version 1.7.8. I am trying to create a class that
I'm trying to get the user's timezone on their first request using Zend Framework.
I'm trying to develop a site using Zend Framework, but i have a problem:
I am trying to find the best way to implement Model using Zend Framework

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.