欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

mysql中取系統(tǒng)當(dāng)前時(shí)間,當(dāng)前日期方便查詢判定的代碼

 更新時(shí)間:2011年12月16日 16:43:46   作者:  
今天在寫一段查詢語句的時(shí)候,需要判定結(jié)束日期是不是大于當(dāng)前日期,一般情況下都是通過php判定日期,然后查詢。
php中常通過下面的代碼,得到判定日期的sql查詢語句
復(fù)制代碼 代碼如下:

$now = time(); //獲取當(dāng)期的日期
$sql="select * from `team` where end_time>$now ORDER BY sort_order limit 0,4";



獲取當(dāng)前時(shí)間的MySql時(shí)間函數(shù)

處理MySql時(shí)間日期的函數(shù)有很多,下面為您介紹的就是用于獲取當(dāng)前時(shí)間的MySql時(shí)間函數(shù),如果您對(duì)此感興趣的話,不妨一看

下面為您介紹的MySql時(shí)間函數(shù)用于獲取當(dāng)前時(shí)間,該MySql時(shí)間函數(shù)極具實(shí)用價(jià)值,希望能對(duì)您學(xué)習(xí)MySql時(shí)間函數(shù)方面有所幫助。
復(fù)制代碼 代碼如下:

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)

相關(guān)文章

最新評(píng)論