ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:activerecord:set

set

Syntax
bool set()

Description

The method set() converts an array to an ADOdb_Active_Record. The array must be numerically indexed, and have all fields of the table defined in the array. The elements of the array must be in the table's natural order too.

If the conversion succeeds, the method returns true, else false.

Usage

$row = $db->GetRow("select * from tablex where id=$id");
 
$obj = new ADOdb_Active_Record('Products');
$obj->Set($row);
v5/activerecord/set.txt · Last modified: 2016/01/13 02:15 by mnewnham