TwistPHP Documentation

delete

File path: dist/twist/Core/Models/Database/Records.model.php
Namespace: Twist\Core\Models\Database
Extends:

deletePermanently delete a record form the selected database table, you can set a limit if you only want to delete a specific amount of records.
If the filter value contains a '%' it will be filtered as a LIKE, if the value contains an array it will be imploded and filtered as an IN otherwise filtering will be done as an EQUALS.

Parameters

Name Type Description
$mxdValuemixedn/a
[$strField = 'id']stringn/a
[$intLimit = 1]integern/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$mxdValue 'foo-123';
$strField 'id';
$intLimit 1;

//Call the function delete with the example vars
$resRecords = new \Twist\Core\Models\Database\Records();
$resRecords -> delete($mxdValue$strField$intLimit);