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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:37:08+00:00 2026-05-25T20:37:08+00:00

I have a simple Left query on mysql SELECT sp. * , p.name, p.date_created

  • 0

I have a simple Left query on mysql

SELECT sp. * , p.name, p.date_created
FROM subpages sp
LEFT JOIN pages p ON p.id = sp.page_id

I dont know how to execuite this query from zend framework.

I have a Mapper Page, which access a DbTable page which is extending Zend_Db_Table_Abstract. I read some articles so i suppose statement should look something like this from the mapper

$select = $this -> DbTable() -> select();
$select -> joinleft(..... This is what I dont know how to write....);
$results = $this -> DbTable() -> fetchAll($select);
if($results) { return $result; }

In the article, $select -> from() were used, that where my mind is stuck , why do we need to write $select -> from("subpages") when It will already be defined in the DbTable page.

How to write the join statement properly?

  • 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-25T20:37:09+00:00Added an answer on May 25, 2026 at 8:37 pm

    If you want to use the select with multiple tables, you need to get it from the table adapter, which is a Zend_Db object (and you’ll need to specify your table in the from() method).

    So, you would need something like the following:

    $select = $this->DbTable()->getAdapter()->select();
    $select->from(array("mi" => "tableName"));
    $select->joinLeft(array("p" => "pages"), "p.id = mi.page_id");
    (etc)
    

    Hope that helps,

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

Sidebar

Related Questions

I have this query: SELECT a.id, b.discount FROM (a LEFT JOIN b ON b.id_a
I have the following query: SELECT dev.DeviceName, Count(dom.DomainID) AS CountOfDomains FROM tblDevices dev JOIN
I have a basic MySQL query: $getFeed = SELECT posts.postID, posts.postTitle, ..... FROM posts
I have this query: SELECT p.id, r.status, r.title FROM page AS p INNER JOIN
I have the following query: mysql> explain SELECT Exhibition.venue_id, Exhibition.name, Exhibition.slug, Venue.name, Venue.slug, Venue.location_id,
I have following query on a MySQL DB: SELECT * , r.id, x.real_name AS
I am calling a simple JOIN SQL on a mySQL database. The exact query
I have created a simple grid of divs by left floating them and an
I have simple regex \.*\ for me its says select everything between and ,
I have simple form. <form target=_blank action=somescript.php method=Post id=simpleForm> <input type=hidden name=url value=http://...> <input

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.