Welcome Guest, Not a member yet? Register   Sign In
Re Enable Transactions after using trans_off()
#7

The Enabling Transactions section begins with

Quote:Transactions are enabled automatically the moment you use $this->db->trans_start(). If you would like to disable transactions you can do so using $this->db->trans_off():

which is followed immediately by this example code.

PHP Code:
$this->db->trans_off();

$this->db->trans_start();
$this->db->query('AN SQL QUERY...');
$this->db->trans_complete(); 

And you don't think that this example suggests, implies or otherwise demonstrates that transactions will be resumed after the call to trans_off()? That has to be because of your intimate knowledge of the source code. Without that knowledge and within the context of "Enabling Transactions" I don't see how the example can be interpreted in any way other than a demonstration of trans_start() as being the opposite of trans_off().

If the point of the example is to explain that the call $this->db->query('AN SQL QUERY...'); will not be handled as a transaction then that needs to be explicitly stated. The fact that
Quote:"disable" doesn't just mean "stop" or "end", it means you're not allowed to do it.
needs to be explained as does the fact that neither trans_start() or trans_begin() will reverse that state.
Reply


Messages In This Thread
RE: Re Enable Transactions after using trans_off() - by dave friend - 10-23-2016, 08:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB