<tfoot id='vDlix'></tfoot>
    <legend id='vDlix'><style id='vDlix'><dir id='vDlix'><q id='vDlix'></q></dir></style></legend>
  • <small id='vDlix'></small><noframes id='vDlix'>

      <bdo id='vDlix'></bdo><ul id='vDlix'></ul>

        <i id='vDlix'><tr id='vDlix'><dt id='vDlix'><q id='vDlix'><span id='vDlix'><b id='vDlix'><form id='vDlix'><ins id='vDlix'></ins><ul id='vDlix'></ul><sub id='vDlix'></sub></form><legend id='vDlix'></legend><bdo id='vDlix'><pre id='vDlix'><center id='vDlix'></center></pre></bdo></b><th id='vDlix'></th></span></q></dt></tr></i><div id='vDlix'><tfoot id='vDlix'></tfoot><dl id='vDlix'><fieldset id='vDlix'></fieldset></dl></div>
      1. 检查当前日期是否在两个日期之间 + mysql select 查询

        时间:2023-05-31
      2. <legend id='8ihGS'><style id='8ihGS'><dir id='8ihGS'><q id='8ihGS'></q></dir></style></legend>
        <i id='8ihGS'><tr id='8ihGS'><dt id='8ihGS'><q id='8ihGS'><span id='8ihGS'><b id='8ihGS'><form id='8ihGS'><ins id='8ihGS'></ins><ul id='8ihGS'></ul><sub id='8ihGS'></sub></form><legend id='8ihGS'></legend><bdo id='8ihGS'><pre id='8ihGS'><center id='8ihGS'></center></pre></bdo></b><th id='8ihGS'></th></span></q></dt></tr></i><div id='8ihGS'><tfoot id='8ihGS'></tfoot><dl id='8ihGS'><fieldset id='8ihGS'></fieldset></dl></div>
          <tbody id='8ihGS'></tbody>

            <tfoot id='8ihGS'></tfoot>

                <small id='8ihGS'></small><noframes id='8ihGS'>

                  <bdo id='8ihGS'></bdo><ul id='8ihGS'></ul>
                  本文介绍了检查当前日期是否在两个日期之间 + 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 查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文章

                  • <bdo id='LOvjD'></bdo><ul id='LOvjD'></ul>
                  <tfoot id='LOvjD'></tfoot>
                  1. <small id='LOvjD'></small><noframes id='LOvjD'>

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

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