PHP often through the following code, get the decision date of the SQL query statement
Copy Code code as follows:
$now = time (); Get the date of the current period
$sql = "SELECT * from ' the ' team ' where end_time> $now order by Sort_order limit 0,4";
gets the MySQL time function for the current time
There are a number of functions to handle MySQL time and date, and here is a MySQL time function for getting the current time, if you are interested in it, may wish to see
The MySQL time function, described below, is used to get the current time, and the MySQL time function is highly practical, and hopefully it will help you learn about MySQL time functions.
Copy Code code as follows:
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)