v5:activerecord:load
This is an old revision of the document!
load
See Also
Syntax
bool load( optional string $where='', optional mixed[] $bindVariables = false, optional bool $lock=false )
Description
Loads a record from the database. If an error occurs it returns false, otherwise true. If the optional 3rd parameter $lock is set to true, the database lock statement is applied to the SELECTed records.
Usage
$person = new person(); $person->Load("id=1"); foreach($person->children as $c) { echo " $c->name_first "; $c->name_first .= ' K.'; $c->Save(); ## each child record must be saved individually }
v5/activerecord/load.1449434023.txt.gz · Last modified: 2017/04/21 11:21 (external edit)