The dbDelete()
function deletes all entries that match the specified prefix.
void dbDelete(string prefix)
Warning: Use this function with great care if you are collecting user data in the Database for Contents. The deletion cannot be undone.
Note: The database entries are deleted regardless of the language version and regardless of whether they were imported or created using dbSet()
or dbStore()
.
Tip: If you only want to delete a single entry from the content database, do not use dbDelete()
, but dbSet()
and enter false
as the value.
The following PHP code deletes all database entries beginning with “A-”.
// Delete database entries with the prefix A- dbDelete('A-');
If you want to delete the Database for Contents of your survey project completely, enter the empty string ''
as the prefix.
// Delete all entries from the content database dbDelete('');