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

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

          <bdo id='JQjaK'></bdo><ul id='JQjaK'></ul>
      1. <legend id='JQjaK'><style id='JQjaK'><dir id='JQjaK'><q id='JQjaK'></q></dir></style></legend>

      2. 检查当前日期是否在两个日期之间 + mysql select 查

        时间:2023-10-03

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

              <i id='l5quK'><tr id='l5quK'><dt id='l5quK'><q id='l5quK'><span id='l5quK'><b id='l5quK'><form id='l5quK'><ins id='l5quK'></ins><ul id='l5quK'></ul><sub id='l5quK'></sub></form><legend id='l5quK'></legend><bdo id='l5quK'><pre id='l5quK'><center id='l5quK'></center></pre></bdo></b><th id='l5quK'></th></span></q></dt></tr></i><div id='l5quK'><tfoot id='l5quK'></tfoot><dl id='l5quK'><fieldset id='l5quK'></fieldset></dl></div>
            1. <legend id='l5quK'><style id='l5quK'><dir id='l5quK'><q id='l5quK'></q></dir></style></legend>
                <tbody id='l5quK'></tbody>
                  <bdo id='l5quK'></bdo><ul id='l5quK'></ul>
                • <tfoot id='l5quK'></tfoot>
                  本文介绍了检查当前日期是否在两个日期之间 + mysql select 查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有下表:

                  id     dateStart     dateEnd      active
                  1      2012-11-12    2012-12-31   0
                  2      2012-11-12    2012-12-31   0
                  

                  我想检查今天的日期是否在 dateStartdateEnd 之间.

                  I want to check if today's date is in between dateStart and dateEnd.

                  以下是我对此的查询:

                  $todaysDate="2012-26-11";
                  $db = Zend_Registry::get("db");
                  $result = $db->fetchAll("SELECT * FROM `table` WHERE active=0 AND {$todaysDate} between dateStart and dateEnd");
                  return $result;
                  

                  但到目前为止它不起作用,因为它返回零行.

                  But so far it's not working as it returns zero rows.

                  推荐答案

                  试试这个 :: 这将解决你的问题

                  Try this :: This will solve your problem

                  SELECT * FROM `table` WHERE active=0 AND CURDATE() between dateStart and dateEnd
                  

                  这篇关于检查当前日期是否在两个日期之间 + mysql select 查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Zend Framework - 多板导航块 下一篇:如何删除 Zend 表单元素上的所有 DtDdWrappers 和标签

                  相关文章

                  最新文章

                    • <bdo id='3cOaZ'></bdo><ul id='3cOaZ'></ul>
                  1. <legend id='3cOaZ'><style id='3cOaZ'><dir id='3cOaZ'><q id='3cOaZ'></q></dir></style></legend>
                    <i id='3cOaZ'><tr id='3cOaZ'><dt id='3cOaZ'><q id='3cOaZ'><span id='3cOaZ'><b id='3cOaZ'><form id='3cOaZ'><ins id='3cOaZ'></ins><ul id='3cOaZ'></ul><sub id='3cOaZ'></sub></form><legend id='3cOaZ'></legend><bdo id='3cOaZ'><pre id='3cOaZ'><center id='3cOaZ'></center></pre></bdo></b><th id='3cOaZ'></th></span></q></dt></tr></i><div id='3cOaZ'><tfoot id='3cOaZ'></tfoot><dl id='3cOaZ'><fieldset id='3cOaZ'></fieldset></dl></div>
                    <tfoot id='3cOaZ'></tfoot>
                  2. <small id='3cOaZ'></small><noframes id='3cOaZ'>