|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-03-29 12:51 UTC] arnoldvmartinez at yahoo dot com
Description:
------------
First, I run a SELECT command to retrieve records from a table. Then, I initiated an ibase_trans, inserted a record, and called ibase_commit. Next, I run another SELECT statement but I noticed that the newly-inserted record is not being returned. When I checked the database, however, the record is indeed added in the table.
On the other hand, if i don't run the first SELECT request and initiated an ibase_trans, inserted a record and called ibase_commit, then the newly-created record is returned when I do a SELECT request. It seems like Firebird retrieves from its cache eventhough a transaction has just been committed.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 16:00:01 2025 UTC |
$dbh = ibase_connect($host, $user, $password); $stmt = 'SELECT * FROM Employees'; $sth = ibase_query($dbh, $stmt); while ($row = ibase_fetch_object($sth)) { echo '<br>'.$row->EMPNAME; } $th=ibase_trans(IBASE_DEFAULT,$dbh); $stmt='INSERT statement here...'; $sth = ibase_query($th, $stmt); ibase_commit($th); $stmt = 'SELECT * FROM Employees'; $sth = ibase_query($dbh, $stmt); while ($row = ibase_fetch_object($sth)) { echo '<br>'.$row->EMPNAME; } /* new record not listed */