v5:activerecord:find
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| v5:activerecord:find [2016/01/16 22:55] – ↷ Links adapted because of a move operation mnewnham | v5:activerecord:find [2025/10/05 02:20] (current) – mnewnham | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== find====== | + | ====== find ====== |
| ~~NOTOC~~ | ~~NOTOC~~ | ||
| <WRAP right box> | <WRAP right box> | ||
| == Syntax == | == Syntax == | ||
| - | bool find( | + | |
| string $where | string $where | ||
| + | optional string $bindarr=false, | ||
| + | optional string $pkeysArr=false, | ||
| + | optional array $extra=array() | ||
| ) | ) | ||
| </ | </ | ||
| ===== Description ===== | ===== Description ===== | ||
| - | This function is part of [[v5: | + | This function |
| + | |||
| + | If no results are returned the method returns false | ||
| + | |||
| + | It is part of both [[v5: | ||
| -------------------------------------- | -------------------------------------- | ||
| + | ===== Parameters ===== | ||
| + | ==== $where ==== | ||
| + | An SQL string (not including WHERE to match a subset of records | ||
| + | ==== $bindarr ==== | ||
| + | An optional array of bind variables if required by the where statement | ||
| + | |||
| + | ==== $pkeysArr ==== | ||
| + | |||
| + | ==== $extra ==== | ||
| + | $extra provides an optional set of parameters | ||
| + | |||
| + | |Parameter|Description| | ||
| + | |limit| Select Record Limit| | ||
| + | |offset| Select Record Offset| | ||
| ===== Usage ===== | ===== Usage ===== | ||
| + | This example finds all entries in the persons table whose birth date is less than 2019-01-01 | ||
| <code php> | <code php> | ||
| $person = new Person; | $person = new Person; | ||
| - | $person-> | + | $person-> |
| </ | </ | ||
v5/activerecord/find.1452981323.txt.gz · Last modified: (external edit)
