Translations of this page:
 

dbDelete()

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.

  • prefix
    Use this to specify which entries are to be deleted from the content database. All entries beginning with this string are deleted.

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('');
en/create/functions/dbdelete.txt · Last modified: by anja.vandersmissen
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki