Delete Records

"It's still web development, it's just way easier!"

Delete Database Records

To delete database entries use the DELETE and DELETE_KEYS fields. The DELETE_KEYS field may be followed by the underscore and a database name, which will instruct Wrival to only delete the key or keys in its value for that database. If the DELETE_KEYS field isn't followed by a database then all those keys will be deleted in all of the databases listed in DELETE. In the case that other fields are instructing operations on database entries, such as SAVE, the deletes are done first.

The value for DELETE needs to be a database name or a comma-separated list of database names. The value for DELETE_KEYS needs to be the key that is to be deleted or a comma-separated list of keys to be deleted. All keys is all databases will get deleted.

Another option available for checkboxes is to use DELETE_KEY_ + a key for a field name with a value of "1".

Example 1

This example would delete all the keys in both databases.

<input type="hidden" name="DELETE" value="DB1,DB2">
<input type="hidden" name="DELETE_KEYS" value="A,B,C">

Submit, then...

<#DB1|A|Key>
<#DB1|B|Key>
<#DB1|C|Key>

<#DB2|A|Key>
<#DB2|B|Key>
<#DB2|C|Key>

Example 2

This example would delete all A entries in both databases, plus B and C entries in DB1 and D and E entries in DB2.

<input type="hidden" name="DELETE" value="DB1,DB2">
<input type="hidden" name="DELETE_KEYS" value="A">
<input type="hidden" name="DELETE_KEYS_DB1" value="B,C">
<input type="hidden" name="DELETE_KEYS_DB2" value="D,E">

Submit, then...

<#DB1|A|Key>
<#DB1|B|Key>
<#DB1|C|Key>

<#DB2|A|Key>
<#DB2|D|Key>
<#DB2|E|Key>

Example 3

This example would delete all any entries that are checked in DB1 or DB2.

<input type="hidden" name="DELETE" value="DB1,DB2">
<input type="checkbox" name="DELETE_KEY_A" value="1"> A
<input type="checkbox" name="DELETE_KEY_B" value="1"> B
<input type="checkbox" name="DELETE_KEY_C" value="1"> C
<input type="checkbox" name="DELETE_KEY_D" value="1"> D
<input type="checkbox" name="DELETE_KEY_E" value="1"> E
<input type="checkbox" name="DELETE_KEY_F" value="1"> F
<input type="checkbox" name="DELETE_KEY_G" value="1"> G
<input type="button" value="Delete Checked">

Displayed:

A
B
C
D
E
F
G