Query Batch

From: B B (hell_wild_hot2_at_yahoo.com)
Date: 11/19/03


Date: Tue, 18 Nov 2003 18:32:26 -0800 (PST)
To: php-general@lists.php.net


 Jhon you mentioned that one may send a batch of
queries with mysql_list? maybe I understood you wrong.

 I am translating an MS-SQL application into
mysql/php. I need to be able to send a batch of
queries all at once. For example:
 $qStr = " Insert into A(name, address)
values('$name', '$address') ; Insert into B(personID,
department ...)values (@@identity, '$department');" ;

 $result= mysql_query($qStr, $link) ;

 In this case I inserted in two tables. for some
reason it doesn't allow me to have to sql statements
in $qStr. Is there a way around that.

 My other option is to have one sql statement per
query .... but this would be very inefficient if I
have ti do tens of inserts in one batch ...

 Cheers.
 

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree



Relevant Pages

  • Pausing until a form has fully loaded
    ... when this form is opened it fires off a batch of queries which all ... As I am starting these queries by the "on load" property of the form they ... start running before the form has a chance to fully display on the screen. ...
    (comp.databases.ms-access)
  • Re: Batch versus Interactive queries
    ... All queries should be run in batch.... ... It won't really take a great deal more resource interactively, ... submitted to batch in a seperate "batch ... Or, I guess my question is, which is more resource heavy, Batch or ...
    (comp.sys.ibm.as400.misc)
  • Re: Pausing until a form has fully loaded
    ... when this form is opened it fires off a batch of queries which all ... do there job happily munching away on my data. ... As I am starting these queries by the "on load" property of the form they ... start running before the form has a chance to fully display on the screen. ...
    (comp.databases.ms-access)
  • STRAWBERRY BEER FOREVER
    ... Hearty thanks to all who took the time and effort to answer my queries ... It was, of course, an all-extract batch. ...
    (rec.crafts.brewing)
  • Re: create multiples Stored Procedures usign ADOB command
    ... Since GO is not a valid Transact-SQL statement, but a batch statement, you ... Only way to execute batch of the SQL statements using OLEDB ... > Into query analyzer, to run a query batch, GO command is used to run all ...
    (microsoft.public.vb.database.ado)