473,485 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to avoid Maximum execution error

14 New Member
Hi,
I have a loop which inserts data to database .I need to insert 500 records one by one in a loop.

<?
for($i=0;$i<500;$i++){
---values insert into db
}
?>

After 30 -40 records inserting i am getting maximum execution error. Is there any alternative to handle this situation.
Jan 11 '07 #1
2 1592
b1randon
171 Recognized Expert New Member
Hi,
I have a loop which inserts data to database .I need to insert 500 records one by one in a loop.

<?
for($i=0;$i<500;$i++){
---values insert into db
}
?>

After 30 -40 records inserting i am getting maximum execution error. Is there any alternative to handle this situation.
Try using the Set_time_limit() function (http://www.php.net/set_time_limit ) which will reset the maximum execution timer to 0.
Jan 11 '07 #2
b1randon
171 Recognized Expert New Member
Try using the Set_time_limit() function (http://www.php.net/set_time_limit ) which will reset the maximum execution timer to 0.
You should also consider you solution. Is there something more elegant than entering the records this way? It's horrible on performance.
Jan 11 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3981
by: Dave Smithz | last post by:
Hi, My PHP application for a client uses the publicly available "PHPMailer - PHP email class" which is very good. However, my client recently complained about the following error when sending...
2
1636
by: ivancasher | last post by:
I´ve this warning in a php page "Maximum execution time of 30 seconds exceeded ", I´ve configurated the php.in, setting the value of max_execution_time = 1200, and then i restart the apache...
9
4994
by: Shuan | last post by:
I am getting this error. Can it be fixed by setting more than 60 for the max_execution_time in php.in file? Fatal error: Maximum execution time of 60 seconds exceeded in categorycrawler.php on...
5
12236
by: alingsjtu | last post by:
Hello, every body. When execute dynamic generated multiple OPENQUERY statements (which linkes to DB2) in SQLServer, I always got SQL1040N The maximum number of applications is already connected...
4
1818
by: Tony | last post by:
Well the subject says it all. Do I have to have it if I use classes in C++? Tony
6
1436
by: Moses | last post by:
Hi All, How to avoid the execution of a function at the time of defining. Here i am giving the details. I am creating the following div container through DOM.
1
7157
by: David Greenberg | last post by:
Hello I am running a DTS (Sql 2000) and transfering data from an SqlServer database to an Ingres database. I am transfering 153k rows. Execution fails with the error message: "The number of...
4
2104
by: DC | last post by:
Hi, the subject says it all. Since visible=false controls will still run though Page_Load, I was hoping that the MultiView would somehow manage to avoid a Page_Load of controls in its inactive...
2
3030
by: Richard | last post by:
Hello all, I am looking into issues with time-outs on a website. These appear to happen in a random way for some users. This is one example: Fatal error: Maximum execution time of 60 seconds...
0
7090
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6960
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7116
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7161
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6825
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7275
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5418
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4857
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3063
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.