In the preceding note,
$sth = ibase_query($dbh, $stmt);
^^^^ this is a query (or statement handle)
while ($row = ibase_fetch_object($sth)) {
^^^^ this is a result
So the end is wrong, because $sth isn't a result
ibase_free_result($sth); // <-------
ibase_close($dbh);
It should really read as follows:
ibase_free_result($row);
ibase_free_query($sth);
ibase_close($dbh);
ibase_close
(PHP 4, PHP 5)
ibase_close — Schließt die Verbindung zu einer InterBase-Datenbank
Beschreibung:
int ibase_close
([ int
$connection_id
] )Beendet die Verbindung zu einer InterBase-DB, deren Verbindungs-ID mit der von ibase_connect() zurück gegebenen ID überein stimmt. Wird die Verbindungs-ID weg gelassen, wird die zuletzt hergestellte Verbindung beendet. Vorgenommene Transaktionen der Verbindung werden übertragen, andere werden zurück genommen.
ibase_close
php dot planetmirror dot com at issystems dot co dot nz
22-Dec-2004 10:38
22-Dec-2004 10:38
02-Apr-2002 01:18
Before close the connection remember to free your query results too...
$dbh = ibase_connect($host, $username, $password);
$stmt = 'SELECT * FROM tblname';
$sth = ibase_query($dbh, $stmt);
while ($row = ibase_fetch_object($sth)) {
.............
}
ibase_free_result($sth); // <-------
ibase_close($dbh);