Multiple inserts as a single string?
| From: | Thomas | Date: | Thu, 02 Jun 2005 09:20:11 +0000 |
| Subject: | Multiple inserts as a single string? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-216210@lists.php.net to get a copy of this message | ||
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 inserting, that way
we don't call the db n times from php. Does that make any difference?
Maybe I am just stupid .
Thomas