RE: [PHP-DB] Can I UPDATE 2 tables with 1 SQL statement?

From: Date: Wed, 29 Aug 2001 12:52:11 +0000
Subject: RE: [PHP-DB] Can I UPDATE 2 tables with 1 SQL statement?
Groups: php.db 
Request: Send a blank email to php-db+get-11950@lists.php.net to get a copy of this message
This is not standard SQL so most databases won't support it. Access is supposed to support this kind of updates, but then it won't work on other db's A "better" way to do this is to issue two separate inserts right after each other within a transaction. But this will also crash some databases as not all databases support transactions, notably MySQL and Access. However oracle, db2, interbase, .... do support this kind of thing and this is the standard way of handling multiple connected sql commands. The simple way is to issue two separate inserts right after each other without transactions but this might lead to concurrency problems Robert Klinkenberg

« previous php.db (#11950) next »