<?php
$index = 4;
$id = dba_open("frenzy.db", "w", "flatfile");
if(!$id) exit ("Some error...");
if(dba_exists($index, $id)) exit ("This key is using");
dba_close($id);
?>(PHP 4, PHP 5, PHP 7, PHP 8)
dba_exists — キーが存在するかどうかを確認する
dba_exists() は、指定した key
がデータベースに存在するかどうかを確認します。
key確認を行うキー。
dbadba_open() または dba_popen() によって返される Dba\Connection インスタンス
| バージョン | 説明 |
|---|---|
| 8.4.0 |
dba は Dba\Connection クラスのインスタンスを期待するようになりました。
これより前のバージョンでは、 dba resource を期待していました。
|
<?php
$index = 4;
$id = dba_open("frenzy.db", "w", "flatfile");
if(!$id) exit ("Some error...");
if(dba_exists($index, $id)) exit ("This key is using");
dba_close($id);
?>