Why is it possible to insert more than 1000 PHP statements to the database in a loop ;? Php $ link = mysql_connect ('localhost', 'root', 'qnmlgb') or & nbsp; die ('error'); mysql_select_db ('SQL ', why can I insert more than 1000 PHP statements to the database in a loop?
$ Link = mysql_connect ('localhost', 'root', 'qnmlgb') or die ('error ');
Mysql_select_db ('SQL', $ link );
Mysql_query ('set names utf8 ;');
$ Jks = 'new field table ';
For ($ I = 1; I I <10000; $ I ++ ){
Echo $ I .'
';
Mysql_query ("insert into 'name' values ('$ I', '$ jks ')");
}
Mysql_close ($ link );
================================
It should have been inserted 10 thousand times before it was stopped, but I saw that the database was stopped only after 1014 was inserted. after reading the ECHO page, an error occurred.
Fatal error: Maximum execution time of 30 seconds exceeded in E: \ web \ SQL. php on line 10
In this case, why do we share the following information:
------ Solution --------------------
Timeout
Run set_time_limt (0) before the loop );