<tfoot id='Cf0EM'></tfoot>

<legend id='Cf0EM'><style id='Cf0EM'><dir id='Cf0EM'><q id='Cf0EM'></q></dir></style></legend>

    • <bdo id='Cf0EM'></bdo><ul id='Cf0EM'></ul>

      <i id='Cf0EM'><tr id='Cf0EM'><dt id='Cf0EM'><q id='Cf0EM'><span id='Cf0EM'><b id='Cf0EM'><form id='Cf0EM'><ins id='Cf0EM'></ins><ul id='Cf0EM'></ul><sub id='Cf0EM'></sub></form><legend id='Cf0EM'></legend><bdo id='Cf0EM'><pre id='Cf0EM'><center id='Cf0EM'></center></pre></bdo></b><th id='Cf0EM'></th></span></q></dt></tr></i><div id='Cf0EM'><tfoot id='Cf0EM'></tfoot><dl id='Cf0EM'><fieldset id='Cf0EM'></fieldset></dl></div>

      <small id='Cf0EM'></small><noframes id='Cf0EM'>

      1. 如何在 Zend 框架中使用子查询执行查询

        How execute query with subqueries in zend framework(如何在 Zend 框架中使用子查询执行查询)
        1. <tfoot id='9P3dS'></tfoot>

              • <bdo id='9P3dS'></bdo><ul id='9P3dS'></ul>

                  <i id='9P3dS'><tr id='9P3dS'><dt id='9P3dS'><q id='9P3dS'><span id='9P3dS'><b id='9P3dS'><form id='9P3dS'><ins id='9P3dS'></ins><ul id='9P3dS'></ul><sub id='9P3dS'></sub></form><legend id='9P3dS'></legend><bdo id='9P3dS'><pre id='9P3dS'><center id='9P3dS'></center></pre></bdo></b><th id='9P3dS'></th></span></q></dt></tr></i><div id='9P3dS'><tfoot id='9P3dS'></tfoot><dl id='9P3dS'><fieldset id='9P3dS'></fieldset></dl></div>
                  <legend id='9P3dS'><style id='9P3dS'><dir id='9P3dS'><q id='9P3dS'></q></dir></style></legend>
                    <tbody id='9P3dS'></tbody>

                  <small id='9P3dS'></small><noframes id='9P3dS'>

                  本文介绍了如何在 Zend 框架中使用子查询执行查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我需要用 Zend_Db_Select 编写这个 sql,但我不知道如何编写子查询.我将不胜感激任何帮助.谢谢.

                  Hi I need write this sql with Zend_Db_Select, but I dont know how I can write subqueries. I would appreciate any help. Thanks.

                  SELECT * FROM advert WHERE categoryId
                             IN (
                               SELECT id
                                FROM `tree`
                                WHERE `lft` BETWEEN 
                                 (SELECT lft FROM tree WHERE id = '2') AND 
                                 (SELECT rgt FROM tree WHERE id = '2'))
                  

                  推荐答案

                  // create the main query
                  $select = new Zend_Db_Select();
                  
                  //create the subquery
                  $subSelect = new Zend_Db_Select();
                  
                  // using the subquery in main query
                  $select->where('table.field IN(?)', $subSelect->assemble());
                  

                  这篇关于如何在 Zend 框架中使用子查询执行查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  SQL query to group by day(按天分组的 SQL 查询)
                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                  MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                  Include missing months in Group By query(在 Group By 查询中包含缺失的月份)
                  Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)

                    • <bdo id='f85d2'></bdo><ul id='f85d2'></ul>
                        <tbody id='f85d2'></tbody>
                      <tfoot id='f85d2'></tfoot>
                      <i id='f85d2'><tr id='f85d2'><dt id='f85d2'><q id='f85d2'><span id='f85d2'><b id='f85d2'><form id='f85d2'><ins id='f85d2'></ins><ul id='f85d2'></ul><sub id='f85d2'></sub></form><legend id='f85d2'></legend><bdo id='f85d2'><pre id='f85d2'><center id='f85d2'></center></pre></bdo></b><th id='f85d2'></th></span></q></dt></tr></i><div id='f85d2'><tfoot id='f85d2'></tfoot><dl id='f85d2'><fieldset id='f85d2'></fieldset></dl></div>

                      <small id='f85d2'></small><noframes id='f85d2'>

                            <legend id='f85d2'><style id='f85d2'><dir id='f85d2'><q id='f85d2'></q></dir></style></legend>