这个mysql怎么总是错的?
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
------解决方案--------------------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) //
------解决方案--------------------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)