Re: Update multiple tables

From: Date: Thu, 26 Aug 2004 13:55:27 +0000
Subject: Re: Update multiple tables
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-35897@lists.php.net to get a copy of this message
From: "Khalid Judeh" <khjudeh@yahoo.com>
I have a script that make changes to the database in more than one sql statement, as i need to update more than one table at the same time, I want to know if there is a method where all of those changes are committed, or rolled back if some error occured(lets say in the last sql statement).
When asking questions like this, it's a smart idea to actually mention what database you're using. Either way, you need to use transactions. Either use a database that supports them (most of them do, to varying degrees of complexity) or use a database abstraction layer that simulates them. ADOdb comes to mind, although I've never used that feature. http://adodb.sourceforge.net ---John Holmes...

« previous php.db (#35897) next »