Multiple mysql queries - ERROR 500

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
gizma
-


Joined: 29 Sep 2003
Posts: 1

PostPosted: Wed Nov 23, 2005 1:26 am    Post subject: Multiple mysql queries - ERROR 500 Reply with quote

I have the latest Abyss, PHP, MySql and phpMyAdmin, all working fine.

When I do a simple loop to insert rows into a MySql table i get an ERROR 500
is this because i've got too many INSERTS?

simplified, it goes something like this...
Code:

for($i = 1 ; $i < 1500 ; $i++){
   $sqlArtists = "INSERT INTO mytable (id,artist) VALUES ('0','dummy name');";
   $result = mysql_query($sqlArtists,$conn);
}


how could i go about improving this, as i need to make other queries according to results from this query in the same loop.. so can't use multiple "INSERT INTO mytable ('0','dummy name 1'),('0','dummy name 2')..etc.."

what is good practice for large amounts of inserts?
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Nov 23, 2005 12:15 pm    Post subject: Re: Multiple mysql queries - ERROR 500 Reply with quote

gizma,

It seems that you are getting error 500 because the script execution timed out (it took more than 30 seconds). You should increase both PHP execution timeout (in php.ini) and Abyss Web Server's CGI Execution timeout value.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group