dba_exists
(PHP 4, PHP 5, PHP 7, PHP 8)
dba_exists — 检查键是否存在
更新日志
版本 | 说明 |
---|---|
8.4.0 |
dba 参数现在接受 Dba\Connection 实例,
之前接受有效的 dba resource。
|
参见
- dba_delete() - 删除由键指定的 DBA 条目
- dba_fetch() - 获取由键指定的数据
- dba_insert() - 插入条目
- dba_replace() - 替换或插入条目
+添加备注
用户贡献的备注 1 note
frenzy dot ivan at gmail dot com ¶
16 years ago
<?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);
?>