sql query if where condition of one tble z true then fetch related data frm next table as well as same table in zend framework
<p>i had created two table <code>products</code> and <code>bid</code>. in <code>products</code> table there is a column <code>verified</code>. both table contain <code>product_id</code>. i need to write an sql query in <code>zend frameWork</code> for fetching data from <code>products</code> table , where verified column value is <code>Yes</code> and also the related data from <code>bid</code> table using foreign key <code>product_id</code>. 
I tried with the below query. But its fetching first one data only, whose <code>product_id</code> is available in both <code>bid</code> and <code>product</code> table.</p>

<p>sql query</p>

<pre><code>public function fetchAllProductItems() {
    $oSelect = $this-&gt;select()
            -&gt;setIntegrityCheck(false)
            -&gt;from(array("p" =&gt; "products","b" =&gt; "bid"), ('*'))
            -&gt;join(array("b" =&gt; "bid"), "b.product_id=p.product_id", array('bid_id','bid_amount'))
            -&gt;where("p.verified = ?", "Yes");

    return $oSelect;


}   
</code></pre>

<p>Please anyone help me to write the exact query. 
Replies are appreciable</p>