Ec (2); well, the code below is a bit messy. I did it during the test. The phpmysql date computing code [datediff] is also what I will try today. the Code functiona ($ d) {$ Date_1date (& quot; Y-m-d & quot;); & nbsp; $ Date_2 $ d; $ Date_List_a1explode (& quot; -& quot;, $ Date_1); & nbsp; script ec (2); script
The following code is a bit messy: I did it during the test. The php mysql date calculation code [datediff] is also what I will try today. Let's take a look at the code below.
Function a ($ d ){
$ Date_1 = date ("Y-m-d ");
$ Date_2 = $ d;
$ Date_List_a1 = explode ("-", $ Date_1 );
$ Date_List_a2 = explode ("-", $ Date_2 );
$ D1 = mktime (0, 0, 0, $ Date_List_a1 [1], $ Date_List_a1 [2], $ Date_List_a1 [0]);
$ D2 = mktime (0, 0, 0, $ Date_List_a2 [1], $ Date_List_a2 [2], $ Date_List_a2 [0]);
Return round ($ d1-$ d2)/3600/24 );
}
// Echo $ Days;
$ D = date ("Y-m-d H: I: s ");
$ SQL = "Select * from wk_member where m_ip = '2017. 0.0.1 'and datediff (m_dtime,' $ D') = 0 ";
$ Result = mysql_query ($ SQL) or die (mysql_error ());
If (mysql_num_rows ($ result) <5 ){
Echo 'T ';
}
While ($ rs = mysql_fetch_array ($ result )){
Echo $ rs ['id'];
Echo'
';
}
For original site reprinted, please indicate www.111cn.net