Deleting From Database
|
xdd_delete([DATABASE-FILE], [ENTRY-ID], {OPTION}, {OPTION})
|
[DATABASE-FILE]
Database File Path Location. This field should contain a relative path to either an existing database file, or one to be written. The name or extension of the file is a user choice. Many use .txt files or .db files.
[ENTRY-ID]
Entry identifier used to read, delete and replace entries. This string (text) can contain virtually any text.
{OPTION}
These are the locations of optional commands. They can be interchanged, and given in any order. Here is a list of optional commands for this function, and their properties.
"ID_OVERRIDE"
Stops the system from converting the specified ID to <!--ID-->. This is useful when searching for phrases or words instead of a default entry ID.
"NONCASE"
With NONCASE enabled the system will conduct a non-case sensitive search. Otherwise, "test", "TEST" and "tEsT" are seen as different words.
How It Works
xdd_delete() allows you to delete all matching entries with one function call. You can narrow or broaden your search using optional commands.
Example Usage:
These are some examples on the usage of this function. You can use these examples as templates for your own application, or in unison with the information above to learn more.
Delete all entries containing <!--Test--> from "database.db"
|
<?php
xdd_delete("database.db", "Test");
?>
|
Delete all entries containing the word "Test" (Non-Case Sensitive) from "database.db"
|
<?php
xdd_delete("database.db", "Test", "NONCASE");
?>
|
|