mysql> set @status = "2000:01:31 23:59:59";
    -> select round((time_to_sec(time(@status))-time_to_sec(time("2000:01:01 00:
00:00")))/60);//感觉应该是对的为什么总有错,请高手点拨。
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near ';
select round((time_to_sec(time(@status))-time_to_sec(time("2000:01:01 00:00:00'
at line 1

解决方案 »

  1.   

    set @status = "2000:01:31 23:59:59"//
    select round((time_to_sec(time(@status))-time_to_sec(time("2000:01:01 00:00:00")))/60) //
      

  2.   

    yinbenli609 (yinbenli609)
      '截至2012-06-02 21:13:40  用户结帖率0.00%  当您的问题得到解答后请及时结贴.
    http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html
    http://topic.csdn.net/u/20100428/09/BC9E0908-F250-42A6-8765-B50A82FE186A.html
    http://topic.csdn.net/u/20100626/09/f35a4763-4b59-49c3-8061-d48fdbc29561.html8、如何给分和结贴?
    http://community.csdn.net/Help/HelpCenter.htm#结帖
      

  3.   

    mysql> set @status = "2000:01:31 23:59:59";
    Query OK, 0 rows affected (0.03 sec)mysql> select round((time_to_sec(time(@status))-time_to_sec(time("2000:01:01 00:    "> 00:00")))/60);
    +-------------------------------------------------------------------------------
    ---+
    | round((time_to_sec(time(@status))-time_to_sec(time("2000:01:01 00:
    00:00")))/60) |
    +-------------------------------------------------------------------------------
    ---+
    |                                                                           -489
    00 |
    +-------------------------------------------------------------------------------
    ---+
    1 row in set, 1 warning (0.06 sec)