findRecords

(Since 1.0.0) -- Query items from the database.
function findRecords($orderby = 't.id DESC', $rows_per_page = 15, $where = null, $sql = null)
The findRecords method queries for Pod items in the database. Use the showTemplate or fetchRecord functions to fetch the DB results.

Parameters

ParameterTypeDetails
$orderby STRING sort the items (prefix pod columns with "t." and pick columns with "column_name_here.")
$rows_per_page INT the number of items per page, set to -1 for no limit (default: 15)
$where STRING only show items that meet a certain criteria (prefix pod columns with "t." and pick columns with "column_name_here.")
$sql STRING use your own SQL SELECT statement (advanced)

Column Prefixes are Important

Columns can be referenced for both non-PICK columns and PICK Columns in the $orderby and $where parameters.
  1. To reference a non-PICK column, prefix the column name with "t." (e.g. "t.amount")
  2. To reference PICK column, use the column_name[dot]related_column_name (e.g. "person.first_name")

Returns

Nothing