ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:activerecord:replace

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)
v5/activerecord/replace.txt · Last modified: 2016/01/13 02:15 by mnewnham