<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 框架中使用子查询执行查询

        时间:2024-04-15
        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 框架中使用子查询执行查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Zend_Auth_Adapter_DbTable 提供的参数未能生成有效的 sql 语句 下一篇:Zend_Db 按字段值排序

                  相关文章

                  • <bdo id='f85d2'></bdo><ul id='f85d2'></ul>
                  <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>