Code Comments
Programming Forum and web based access to our favorite programming groups.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...
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.