- skip to content

# Database Abstraction Layer

### User Tools

- Login

### Site Tools

- Recent changes
- Media Manager
- Sitemap

### Sidebar

##### Resources

- Reference Manual
- User Guide
- The Data Dictionary
- ADOdb-xmlschema
- ADOdb Active Record
- Performance Monitoring
- Date/Time Library
- Session Management Library
- Unsupported Addons
- Coding Standards

##### Supported Databases

- Access
- ADO
- CSV
- Firebird
- Frontbase
- IBM DB2
- Informix
- Interbase
- LDAP
- Microsoft SQL Server
- MySQL
- Netezza
- ODBC
- ODBTP
- Oracle
- PDO
- Postgresql
- SAP ADS
- SAP ASE
- SAP Maxdb
- SAP Sqlanywhere
- Sqlite
- Sybase
- Plain Text
- Visual Foxpro

##### Other

- Feature Comparison Matrix
- Connection Matrix
- Include File Guide

v5:activerecord:load

# load

##### See Also

execute

##### 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.txt · Last modified: 2016/01/18 11:47 by 66.249.75.217

### Page Tools

- Show pagesource
- Old revisions
- Backlinks
- Rename Page
- Back to top