SproutCMS

This is the code documentation for the SproutCMS project

function deleteRecord()

Deletes a record, and logs the deletion
This should be used by all _deleteSave methods
Starts a transaction and commits it if not already in a transaction when called

Usage

int $Controller->deleteRecord ( string $table , int $record_id [, int $parent_log_id ] );

Arguments

  1. string $table
    Table name
  2. int $record_id
  3. int $parent_log_id = 0
    ID of a parent entry in the history_items table.
           This is used when multiple records are deleted by a single action.
           Undoing that action can then restore all of the deleted data.

Return value

  • int
    ID of the record inserted into the history_items table (0 if no logging)