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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:53:58+00:00 2026-05-20T05:53:58+00:00

I use Zend_Db_Select to perform a query with a Join. I end up with

  • 0

I use Zend_Db_Select to perform a query with a Join. I end up with the following SQL query :

SELECT `Utilisateur`.*, `Ressource`.*, `Acl_Cache`.*, `Role`.*, `UtilisateurRole`.* FROM `Utilisateur`
INNER JOIN `Ressource` ON Ressource.idJointure = Utilisateur.id
INNER JOIN `Acl_Cache` ON Acl_Cache.idRessource = Ressource.id
INNER JOIN `Role` ON Role.id = Acl_Cache.idRole
INNER JOIN `UtilisateurRole` ON UtilisateurRole.idRole = Role.id
WHERE (Ressource.tableJointure = 'Utilisateur') AND (UtilisateurRole.idUtilisateur = '2')

Why is Zend_Db adding this part is the SELECT clause :

, `Ressource`.*, `Acl_Cache`.*, `Role`.*, `UtilisateurRole`.*

I never asked this, and I don’t want that. How to prevent this behavior ?

  • 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-20T05:53:59+00:00Added an answer on May 20, 2026 at 5:53 am
    $db->select()
       ->from(array('alias1'=>'table_i_want_all_cols_on'))
       ->joinLeft(array('alias2'=>'table_i_want_no_cols_on'),
                    'alias1.id = alias2.id',
                    array()
       )
       ->joinLeft(array('alias3'=>'table_i_want_some_cols_on'),
                    'alias3.id = alias1.id',
                    array('col1', 'col2')
       );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use Zend_Db_Select to write a select query that looks somewhat
I'm having some problems translating this query to use ZF's Zend_Db_Select : SELECT b.id,
so basically you can use zend paginate via the following: $sql = new Zend_Db_Select($db);
Following problem: Table with 1000 000 Records If i use the following query with
We use a data acquisition card to take readings from a device that increases
I usually use ORM instead of SQL and I am slightly out of touch
I have to select a framework (or role my own) and one of the
I'm trying to use PHPUnit to unit test some class methods that return SQL.
(please excuse that I didn't use aliases). I would like my query output to
I think it's possible to write select queries with either Zend_Db_Select or Zend_Db_Table_Abstract, but

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.