<? Php Header ("Content-type: text/html; charset = UTF-8 "); // Program running time $ Starttime = explode ('', microtime ()); /* · The following code area ·········*/
$ Link = mysql_connect ("localhost", "root", "root "); Mysql_select_db ("test "); Mysql_query ("set names utf8 "); $ SQL = "select add_time from t1 limit 100000 "; $ Res = mysql_query ($ SQL, $ link ); $ Num = mysql_num_rows ($ res ); While ($ row = mysql_fetch_array ($ res )){ // Echo date ("Y-m-d H: I", $ row ['add _ time']). "| "; } /* · The above is the code area ·········*/ // Program running time
$ Endtime = explode ('', microtime ()); $ Thistime = $ endtime [0] + $ endtime [1]-($ starttime [0] + $ starttime [1]); $ Thistime = round ($ thistime, 3 ); Echo ' //--------------------------------------------------------
//-------------------------------------------------------- // Program running time $ Starttime = explode ('', microtime ()); /* · The following code area ·········*/
$ SQL = "select add_time from t1 limit 100000 "; $ Res = mysql_query ($ SQL, $ link ); $ Num = mysql_num_rows ($ res ); While ($ row = mysql_fetch_array ($ res )){ Echo $ row ['add _ time']. "| "; } /* · The above is the code area ·········*/ // Program running time
$ Endtime = explode ('', microtime ()); $ Thistime = $ endtime [0] + $ endtime [1]-($ starttime [0] + $ starttime [1]); $ Thistime = round ($ thistime, 3 ); Echo ' //--------------------------------------------------------
//-------------------------------------------------------- // Program running time $ Starttime = explode ('', microtime ()); /* · The following code area ·········*/
$ SQL = "select FROM_UNIXTIME (add_time, '% Y-% m-% d % H: % m') as add_time from t1 limit 100000 "; $ Res = mysql_query ($ SQL, $ link ); $ Num = mysql_num_rows ($ res ); While ($ row = mysql_fetch_array ($ res )){ // Echo $ row ['add _ time']. "| "; } /* · The above is the code area ·········*/ // Program running time
$ Endtime = explode ('', microtime ()); $ Thistime = $ endtime [0] + $ endtime [1]-($ starttime [0] + $ starttime [1]); $ Thistime = round ($ thistime, 3 ); Echo ' ?> |