[PHP] Multiple inserts as a single string?

2005-06-02 Thread Thomas
Hi there, I have a bit of strange question: when wanting to insert multiple records into the db, instead of looping through the set and executing mysql_query (which will then call the db n times), is it not better to concat a string with all the insert statements and let mysql handle the

RE: [PHP] Multiple inserts as a single string?

2005-06-02 Thread Shaw, Chris - Accenture
, if it was loop, you know exactly what went wrong by outputing the current insert statement. C. -Original Message- From: Thomas [mailto:[EMAIL PROTECTED] Sent: 02 June 2005 10:20 To: php-general@lists.php.net Subject: [PHP] Multiple inserts as a single string? Hi there, I have a bit of strange

Re: [PHP] Multiple inserts as a single string?

2005-06-02 Thread Richard Davey
Hello Thomas, Thursday, June 2, 2005, 10:20:11 AM, you wrote: T I have a bit of strange question: when wanting to insert multiple T records into the db, instead of looping through the set and T executing mysql_query (which will then call the db n times), is it T not better to concat a string

RE: [PHP] Multiple inserts as a single string?

2005-06-02 Thread Shaw, Chris - Accenture
Message- From: Thomas [mailto:[EMAIL PROTECTED] Sent: 02 June 2005 12:20 To: Shaw, Chris - Accenture Cc: php-general@lists.php.net Subject: RE: [PHP] Multiple inserts as a single string? * This e-mail has been received by the Revenue Internet e-mail service

Re: [PHP] Multiple inserts as a single string?

2005-06-02 Thread Rory McKinley
Richard Davey wrote: snip Sure.. mysql_query doesn't support more than one query in the sql statement. snip At the risk of being thick, does the OP not mean something like this: INSERT INTO blah VALUES (value1, value2), (value3, value4) versus INSERT INTO blah VALUES (value1, value2)

RE: [PHP] Multiple inserts as a single string?

2005-06-02 Thread Thomas
Message- From: Shaw, Chris - Accenture [mailto:[EMAIL PROTECTED] Sent: 02 June 2005 12:20 PM To: Thomas; php-general@lists.php.net Subject: RE: [PHP] Multiple inserts as a single string? Thomas, If you're inserting alot of rows, (eg millions) then concating them and calling the db once

RE: [PHP] Multiple inserts as a single string?

2005-06-02 Thread Thomas
Thanks Richard that makes it clear. Thomas -Original Message- From: Richard Davey [mailto:[EMAIL PROTECTED] Sent: 02 June 2005 12:43 PM To: php-general@lists.php.net Subject: Re: [PHP] Multiple inserts as a single string? Hello Thomas, Thursday, June 2, 2005, 10:20:11 AM, you wrote

RE: [PHP] Multiple inserts as a single string?

2005-06-02 Thread Jared Williams
Thanks Richard that makes it clear. Thomas Hello Thomas, Thursday, June 2, 2005, 10:20:11 AM, you wrote: T I have a bit of strange question: when wanting to insert multiple T records into the db, instead of looping through the set and executing T mysql_query (which will then