TwistPHP Documentation

find

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

findGet/Search data in the database, leaving all the parameters blank will return all records form the database. Set the parameters accordingly if you need to filter, order or limit.
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
[$mxdValue = null]mixedn/a
[$strField = null]stringn/a
[$strOrderBy = null]stringn/a
[$strDirection = 'ASC']stringn/a
[$intLimit = null]integern/a
[$intOffset = null]integern/a

Return Values

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

Example

<?php
//Set the variables for the example
$mxdValue null;
$strField null;
$strOrderBy null;
$strDirection 'ASC';
$intLimit null;
$intOffset null;

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