delete($delete_lookups = FALSE)

See also multiple_delete()

Deletes exactly 1 record from the database that matches the values of the currently set variables. unset variables are not considered.

If   $delete_lookups is TRUE - deletes references from linked to tables that are lookup tables, but NOT from regularly linked to tables. These will need to be deleted manually before deleting here.

Example:

example.php
<?php
include("lib.php");
load("person");

$p = new person($_GET["person_id"]);
if (!
$p->delete())
{
    echo 
"Failed to delete";
    return 
0;
}
echo 
"Delete Successful";

?>