PHP 8.3.4 Released!

ibase_close

(PHP 5, PHP 7 < 7.4.0)

ibase_closeInterBase データベースへの接続を閉じる

説明

ibase_close(resource $connection_id = null): bool

ibase_connect() から返された接続 ID が指す InterBase データベースへのリンクを閉じます。 接続 ID が省略された場合、最後にオープンされたリンクが仮定されます。 リンクにおけるデフォルトのトランザクションがコミットされ、 他のトランザクションはロールバックされます。

パラメータ

connection_id

ibase_connect() が返す InterBase リンク ID。省略した場合は、 最後にオープンしたリンクを使用します。

戻り値

成功した場合に true を、失敗した場合に false を返します。

参考

  • ibase_connect() - データベースへの接続をオープンする
  • ibase_pconnect() - InterBase データベースへの持続的接続をオープンする

add a note

User Contributed Notes 1 note

up
-1
Anonymous
21 years ago
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);
To Top