RE: RE: [PHP] write to multiple sql tables
| From: | Maxim Maletsky \(PHPBeginner.com\) | Date: | Thu, 04 Oct 2001 04:28:04 +0000 |
| Subject: | RE: RE: [PHP] write to multiple sql tables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-69868@lists.php.net to get a copy of this message | ||
You can't do it through PHP.
';' - won't work
Maxim Maletsky
www.PHPBeginner.com
-----Original Message-----
From: Frank M. Kromann [mailto:frank@frontbase.com]
Sent: giovedì 4 ottobre 2001 6.24
To: Maxim Maletsky (PHPBeginner.com)
Cc: 'sc'; php-general@lists.php.net
Subject: Re: RE: [PHP] write to multiple sql tables
Some databsaes allows batches of sql statements. Thes can be passed to
the db server in one query and the statements are usally separated by ;
If you are executing a batch of statements each returning a result you
will have to process each result in your code. This is supported by
ODBC, MS SQL and FrontBase (that I know of)
If you want to insert/update data in multiple tables you might also want
to choose a database with support for transactions, as this will ensure
the consistancy of your data.
- Frank
>
> PHP can only handle a query at a time. If the database in question
> allows you to construct a such query where you can write to multiple
> files then you can. Go to the manual of your DB and look for the
> answer there. For instance; look at the syntax of INSERT.
>
> Maxim Maletsky
> www.PHPBeginner.com
>
>
> -----Original Message-----
> From: sc [mailto:sven@gstar.com.au]
> Sent: giovedì 4 ottobre 2001 2.17
> To: php-general@lists.php.net
> Subject: [PHP] write to multiple sql tables
>
>
> Hi;
>
> Is there any easy way of writing to multiple mysql tables in the one
> database? ie. putting it all in the one query etc? instead of writing
> a heap of code...
>
> Any help would be great...
>
> thx.
>
> -sc
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net To
> contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net To
> contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>