Query Batch
| From: | b b | Date: | Wed, 19 Nov 2003 02:32:26 +0000 |
| Subject: | Query Batch | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-170226@lists.php.net to get a copy of this message | ||
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