replace

bool replace()

Description

ADOdb supports replace functionality, whereby the record is inserted if it does not exists, or updated otherwise.

Returns

The method returns

ValueDescription
0failure
1update
2insert

Usage

$rec = new ADOdb_Active_Record("product");
$rec->name = 'John';
$rec->tel_no = '34111145';
$ok = $rec->replace();
ADOdb_Active_Record::Load($where)