<tfoot id='0eiJ3'></tfoot>
        <bdo id='0eiJ3'></bdo><ul id='0eiJ3'></ul>
    1. <legend id='0eiJ3'><style id='0eiJ3'><dir id='0eiJ3'><q id='0eiJ3'></q></dir></style></legend>

      <small id='0eiJ3'></small><noframes id='0eiJ3'>

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

        Mysql - 从 unix 时间戳中选择年份

        Mysql - selecting year from a unix timestamp(Mysql - 从 unix 时间戳中选择年份)
        • <bdo id='CevFY'></bdo><ul id='CevFY'></ul>

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

            <tbody id='CevFY'></tbody>

                <tfoot id='CevFY'></tfoot>

                  <i id='CevFY'><tr id='CevFY'><dt id='CevFY'><q id='CevFY'><span id='CevFY'><b id='CevFY'><form id='CevFY'><ins id='CevFY'></ins><ul id='CevFY'></ul><sub id='CevFY'></sub></form><legend id='CevFY'></legend><bdo id='CevFY'><pre id='CevFY'><center id='CevFY'></center></pre></bdo></b><th id='CevFY'></th></span></q></dt></tr></i><div id='CevFY'><tfoot id='CevFY'></tfoot><dl id='CevFY'><fieldset id='CevFY'></fieldset></dl></div>
                1. <legend id='CevFY'><style id='CevFY'><dir id='CevFY'><q id='CevFY'></q></dir></style></legend>
                  本文介绍了Mysql - 从 unix 时间戳中选择年份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用这个:

                  SELECT FROM_UNIXTIME(my_unix_timestamp_column, '%Y') AS year FROM table_name WHERE year = 2009;
                  

                  但它给了我一个错误:

                  Unknown column 'year' in 'where clause'SELECT FROM_UNIXTIME(my_unix_timestamp_column, '%Y') AS year FROM table_name WHERE year = 2009
                  

                  my_unix_timestamp_column"和table_name"都是正确的,我不知道为什么它给了我这个!!!

                  Both "my_unix_timestamp_column" and "table_name" are correct, i dont know why it gives me this!!!

                  我使用的是 PHP 5.3.0

                  I'm using PHP 5.3.0

                  推荐答案

                  我不太确定这是因为 YEAR 是 MySQL 中的保留字,还是因为它想让你做某事大致如下:

                  I'm not quite sure whether this is due to YEAR being a reserved word in MySQL or because it wants you to do something along the lines of:

                  SELECT
                    FROM_UNIXTIME(my_unix_timestamp_column, '%Y') AS year
                  FROM
                    table_name
                  WHERE
                    FROM_UNIXTIME(my_unix_timestamp_column, '%Y') = 2009;
                  

                  不记得上一期是否只与GROUPings 相关 :S

                  Can't remember whether the last issue is only relevant to GROUPings :S

                  这篇关于Mysql - 从 unix 时间戳中选择年份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Set the variable result, from query(设置变量结果,来自查询)
                  What is dynamic SQL?(什么是动态 SQL?)
                  Mysql - How to quit/exit from stored procedure(Mysql - 如何退出/退出存储过程)
                  Does MySQL have time-based triggers?(MySQL 有基于时间的触发器吗?)
                  is it possible to call a sql script from a stored procedure in another sql script?(是否可以从另一个 sql 脚本中的存储过程调用 sql 脚本?)
                  Procedure to loop through comma separated string is not working(遍历逗号分隔字符串的过程不起作用)
                    <bdo id='Aiu2o'></bdo><ul id='Aiu2o'></ul>

                    <tfoot id='Aiu2o'></tfoot>

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

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

                          <tbody id='Aiu2o'></tbody>