Subject | Re: [firebird-php] PHP and transactions |
---|---|
Author | Milan Babuskov |
Post date | 2005-08-06T06:34:34Z |
Lester Caine wrote:
like this:
ibase_connect(...);
ibase_query("select ...");
// do something with data
ibase_query("update ...");
Now, you're still inside the "default connection" and "default
transaction" and you'll see all the changes. If you want other users to
see it at once, do:
ibase_commit();
This will commit the default transaction and start new default
transaction. Of course, other connections would have to commit their
transactions to see the changes.
BTW, I'm not 100% sure I understand where the problem occurs. Do you use
persistant connections or something like that?
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org
> I have the default connection, and use it to read data. I start aHow about not starting a transaction, but using the default one. I do it
> transaction
like this:
ibase_connect(...);
ibase_query("select ...");
// do something with data
ibase_query("update ...");
Now, you're still inside the "default connection" and "default
transaction" and you'll see all the changes. If you want other users to
see it at once, do:
ibase_commit();
This will commit the default transaction and start new default
transaction. Of course, other connections would have to commit their
transactions to see the changes.
BTW, I'm not 100% sure I understand where the problem occurs. Do you use
persistant connections or something like that?
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org