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

  • <small id='Z8udc'></small><noframes id='Z8udc'>

      1. <legend id='Z8udc'><style id='Z8udc'><dir id='Z8udc'><q id='Z8udc'></q></dir></style></legend>
        <tfoot id='Z8udc'></tfoot>

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

        使用 MySQL 判断今天是否是用户的生日

        Use MySQL to determine whether today is a user#39;s birthday(使用 MySQL 判断今天是否是用户的生日)
        • <i id='SgGFR'><tr id='SgGFR'><dt id='SgGFR'><q id='SgGFR'><span id='SgGFR'><b id='SgGFR'><form id='SgGFR'><ins id='SgGFR'></ins><ul id='SgGFR'></ul><sub id='SgGFR'></sub></form><legend id='SgGFR'></legend><bdo id='SgGFR'><pre id='SgGFR'><center id='SgGFR'></center></pre></bdo></b><th id='SgGFR'></th></span></q></dt></tr></i><div id='SgGFR'><tfoot id='SgGFR'></tfoot><dl id='SgGFR'><fieldset id='SgGFR'></fieldset></dl></div>
                <tbody id='SgGFR'></tbody>

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

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

              1. <tfoot id='SgGFR'></tfoot>
                  <bdo id='SgGFR'></bdo><ul id='SgGFR'></ul>
                  本文介绍了使用 MySQL 判断今天是否是用户的生日的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我将所有用户的生日都存储为 UNIX 时间戳,并且我想每天向当天生日的用户发送电子邮件.

                  I have all users' birthdays stored as a UNIXtimestamp and am wanting to send out e-mails each day to users that have a birthday that day.

                  我需要进行一个 MySQL 查询,以获取包含今天日期的生日的所有行.

                  I need to make a MySQL query that will get all of the rows that contain a birthday on today's date.

                  这看起来应该相当简单,但也许我只是把它复杂化了.

                  It seems like this should be fairly simple, but maybe I am just overcomplicating it.

                  推荐答案

                  这应该有效:

                     SELECT * 
                        FROM USERS
                        WHERE 
                           DATE_FORMAT(FROM_UNIXTIME(birthDate),'%m-%d') = DATE_FORMAT(NOW(),'%m-%d')
                  

                  这篇关于使用 MySQL 判断今天是否是用户的生日的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  How to delete duplicate records in mysql database?(如何删除mysql数据库中的重复记录?)
                  Python Pandas write to sql with NaN values(Python Pandas 使用 NaN 值写入 sql)
                  MySQL Insert amp; Joins(MySQL 插入 amp;加入)
                  MySQL concat() to create column names to be used in a query?(MySQL concat() 创建要在查询中使用的列名?)
                  NodeJS responded MySQL timezone is different when I fetch directly from MySQL(当我直接从 MySQL 获取时,NodeJS 响应 MySQL 时区不同)
                  WHERE datetime older than some time (eg. 15 minutes)(WHERE 日期时间早于某个时间(例如 15 分钟))

                  1. <legend id='Z3PBI'><style id='Z3PBI'><dir id='Z3PBI'><q id='Z3PBI'></q></dir></style></legend>

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

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

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

                        • <tfoot id='Z3PBI'></tfoot>

                              <tbody id='Z3PBI'></tbody>