UserModel::getDelete PHP Method

getDelete() public method

Get rows from a table then delete them.
Since: 2.1
public getDelete ( string $Table, array $Where, array &$Data )
$Table string The name of the table.
$Where array The where condition for the delete.
$Data array The data to put the result.
    public function getDelete($Table, $Where, &$Data)
    {
        if (is_array($Data)) {
            // Grab the records.
            $Result = $this->SQL->getWhere($Table, $Where)->resultArray();
            if (empty($Result)) {
                return;
            }
            // Put the records in the result array.
            if (isset($Data[$Table])) {
                $Data[$Table] = array_merge($Data[$Table], $Result);
            } else {
                $Data[$Table] = $Result;
            }
        }
        $this->SQL->delete($Table, $Where);
    }
UserModel