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
Value | Description |
---|---|
0 | failure |
1 | update |
2 | insert |
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