Re: Update multiple tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Khalid Judeh" <khjudeh@xxxxxxxxx>
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...

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux