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 (wh

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 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

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

2005-06-02 Thread Rory McKinley
Richard Davey wrote: > > Sure.. mysql_query doesn't support more than one query in the sql > statement. > 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) ne

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

2005-06-02 Thread Shaw, Chris - Accenture
-Original 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

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
Thomas, If you're inserting alot of rows, (eg millions) then concating them and calling the db once probably would give a small speed advantage, because of the database handshaking. But I would look at the load the database is under, if there is alot of users hitting the database with small inser

Re: [PHP] multiple inserts into a db

2005-05-19 Thread Richard Lynch
On Wed, May 18, 2005 9:47 pm, mayo said: > $ses_basket_items is the total number of items > $orderID = the orderID which these items are a part of > $ses_basket_id = is the itemID number Which item ID number? Cuz, like, you've got FOUR different itemID numbers. Something isn't making sense here

Re: [PHP] Multiple Inserts

2001-03-09 Thread Phil Driscoll
The trick here is to do some debugging :) Firstly make sure that your error reporting level is set to E_ALL in php.ini - then you've got some chance of seeing error and warning messages. Secondly, while there are probably loads of ways of doing what you are trying to do, all the correct ones wil

Re: [PHP] Multiple Inserts

2001-03-09 Thread Website4S
In a message dated 09/03/2001 12:38:08 GMT Standard Time, [EMAIL PROTECTED] writes: << Whoa, you're mixing apples with oranges. Try: $db = mysql_select_db($dbase, $connection); $SQLStatement = "INSERT INTO Members (Email) VALUES ('" . $GetEmails[$a] . "')"; //removed the 'or die' portion

Re: [PHP] Multiple Inserts

2001-03-09 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > $SQLStatement = "INSERT INTO Members (Email) VALUES ('".$GetEmails[$a] ."')" > or die ("Problem"); > $db = mysql_select_db($dbase, $connection); > $SQLResult = mysql_query($SQLStatement); Whoa, you're mixing apples with oranges. Try: