<small id='5NNPq'></small><noframes id='5NNPq'>

    <legend id='5NNPq'><style id='5NNPq'><dir id='5NNPq'><q id='5NNPq'></q></dir></style></legend>

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

        在学说 2 中选择日期之间的条目

        Select entries between dates in doctrine 2(在学说 2 中选择日期之间的条目)

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

            <tbody id='Luxke'></tbody>
            • <bdo id='Luxke'></bdo><ul id='Luxke'></ul>
            • <legend id='Luxke'><style id='Luxke'><dir id='Luxke'><q id='Luxke'></q></dir></style></legend>
              • <tfoot id='Luxke'></tfoot>

                1. <i id='Luxke'><tr id='Luxke'><dt id='Luxke'><q id='Luxke'><span id='Luxke'><b id='Luxke'><form id='Luxke'><ins id='Luxke'></ins><ul id='Luxke'></ul><sub id='Luxke'></sub></form><legend id='Luxke'></legend><bdo id='Luxke'><pre id='Luxke'><center id='Luxke'></center></pre></bdo></b><th id='Luxke'></th></span></q></dt></tr></i><div id='Luxke'><tfoot id='Luxke'></tfoot><dl id='Luxke'><fieldset id='Luxke'></fieldset></dl></div>
                  本文介绍了在学说 2 中选择日期之间的条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我会因为这个我没有得到修复的最小错误而发疯.我想在两天之间选择条目,下面的例子说明了我所有的失败:

                  I will go insane with this minimal error that I'm not getting fix. I want to select entries between two days, the examples below ilustrate all my fails:

                  选择 1.

                  $qb->where('e.fecha > ' . $monday->format('Y-m-d'));
                  $qb->andWhere('e.fecha < ' . $sunday->format('Y-m-d'));
                  

                  结果(0 个条目):

                  SELECT r0_.id_reservacion AS id_reservacion0, r0_.fecha AS fecha1, r0_.cliente AS cliente2 
                  FROM reservacion r0_ 
                  WHERE (r0_.fecha > 2012 - 07 - 16) AND (r0_.fecha < 2012 - 07 - 22)
                  

                  选择 2

                  $qb->add('where', 'e.fecha between 2012-01-01 and 2012-10-10');
                  

                  结果(0 个条目):

                  SELECT r0_.id_reservacion AS id_reservacion0, r0_.fecha AS fecha1, r0_.cliente AS cliente2 
                  FROM reservacion r0_ WHERE r0_.fecha 
                  BETWEEN 2012 - 01 - 01 AND 2012 - 10 - 10
                  

                  这是我的当前条目表:

                  id      fecha            cliente
                  1   2012-07-16 00:00:00    2    
                  2   2012-07-16 13:00:00    4    
                  3   2012-07-22 23:00:00    4
                  

                  编辑 1

                  为了评估sql避免疑惑,我运行了这个查询:

                  Edit 1

                  In order to evaluate the sql to avoid doubts, I ran this query:

                  $qb->where('e.fecha > ' . $sunday->format('Y-m-d'));
                  

                  结果(3 个条目):

                  SELECT r0_.id_reservacion AS id_reservacion0, r0_.fecha AS fecha1, r0_.cliente AS cliente2 
                  

                  所以,看起来sql不是问题.FROM 保留 r0_哪里 r0_.fecha > 2012 - 07

                  So, looks like the sql is not the problem. FROM reservacion r0_ WHERE r0_.fecha > 2012 - 07

                  推荐答案

                  你可以...

                  $qb->where('e.fecha BETWEEN :monday AND :sunday')
                     ->setParameter('monday', $monday->format('Y-m-d'))
                     ->setParameter('sunday', $sunday->format('Y-m-d'));
                  

                  或者……

                  $qb->where('e.fecha > :monday')
                     ->andWhere('e.fecha < :sunday')
                     ->setParameter('monday', $monday->format('Y-m-d'))
                     ->setParameter('sunday', $sunday->format('Y-m-d'));
                  

                  这篇关于在学说 2 中选择日期之间的条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                          <tbody id='uUsvm'></tbody>

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

                        <tfoot id='uUsvm'></tfoot>
                      1. <small id='uUsvm'></small><noframes id='uUsvm'>

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

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