Doesn't return false if the key is not in the database (contrary to what the documentation states).
Returns -1 (TRUE) if the key doesn't exist
Returns 0 (FALSE) if the key does exist
This is still a bug (3.0.16 and 4.0.2) and it can still cost you your Saturday afternoon if you comply with the PHP documentation on TRUE (non-zero) and FALSE (0) with regards to this function.
http://www.php.net/manual/language.expressions.php
dbmdelete
(PHP 4)
dbmdelete — DBM データベースから値を削除する
説明
bool dbmdelete ( resource $dbm_identifier, string $key )データベース中の、key に対応する値を削除します。
パラメータ
- dbm_identifier
dbmopen() が返す DBM リンク識別子。
- key
キーを表す文字列。
返り値
成功した場合に TRUE を、失敗した場合に FALSE を返します。 データベース中にキーが存在しない場合は FALSE を返します。
参考
| dbminsert() |
dbmdelete
v dot a dot rao at online dot nl
10-Sep-2000 05:53
10-Sep-2000 05:53