|Subject||Re: [firebird-php] Re: Default transaction|
On 16/12/2011 16:48, ettotev wrote:
> And I am still confused that a function should behave differently (start
> a transaction or not) depending on whether the return value is assigned
> to a variable or not - but this is what I see.
Yes, I can agree that this feel somewhat strange, but if you don't put
the result in a variable, how do you think to pass it as a parameter in
a function call?
In a "good" development environment, in this case an unassigned result
should be discarded and freed as would result in temporary waste of
resources, at best, or memory leaks at worst.
If you don't pass a transaction as first parameter in a set of ibase_*
function call, it's supposed that you intend the default transaction,
that does committ/rollbak at the very end of the script (depending of
configuration, default IIRC is commit, whereas non default trans. are