復制代碼 代碼如下:
 
$now = time(); //獲取當期的日期 
$sql="select * from `team` where end_time>$now ORDER BY sort_order limit 0,4"; 
復制代碼 代碼如下:
 
mysql> select current_timestamp(); 
+---------------------+ 
| current_timestamp() | 
+---------------------+ 
| 2010-01-18 21:24:37 | 
+---------------------+ 
1 row in set (0.00 sec) 
mysql> select current_date(); 
+----------------+ 
| current_date() | 
+----------------+ 
| 2010-01-18 | 
+----------------+ 
1 row in set (0.00 sec) 
mysql> select current_time(); 
+----------------+ 
| current_time() | 
+----------------+ 
| 21:24:46 | 
+----------------+ 
1 row in set (0.00 sec) 
新聞熱點
疑難解答