<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 判断今天是否是用户的生日

        时间:2023-06-25
        • <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 判断今天是否是用户的生日的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:mysql 选择不同的行到逗号分隔的列表列中 下一篇:MySQL 错误:UPDATE 和 LIMIT 的错误使用

                  相关文章

                  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>

                  2. <tfoot id='Z3PBI'></tfoot>