Welcome Guest, Not a member yet? Register   Sign In
How to update reordenated menu items in DB
#8

[eluser]gon[/eluser]
If you start doing updates for setting every item order, what if the last query fails?

Transactions allow you to write changes only if all queries work.

If you use transactions when writing the order of every item in different queries, all the queries will be considered as an atomic operation, because they are all either done or not. So you write all the updates, or you dont write any of them if there is an error.

check the codeigniter transactions user guide, its easy to implement them. But remember that in MySQL only InnoDB tables allow the use of transactions.


Messages In This Thread
How to update reordenated menu items in DB - by El Forum - 06-22-2008, 05:43 PM
How to update reordenated menu items in DB - by El Forum - 06-22-2008, 06:30 PM
How to update reordenated menu items in DB - by El Forum - 11-28-2008, 09:01 AM
How to update reordenated menu items in DB - by El Forum - 11-29-2008, 08:04 AM
How to update reordenated menu items in DB - by El Forum - 11-29-2008, 09:06 AM
How to update reordenated menu items in DB - by El Forum - 11-29-2008, 09:49 AM
How to update reordenated menu items in DB - by El Forum - 11-30-2008, 07:38 AM
How to update reordenated menu items in DB - by El Forum - 11-30-2008, 07:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB