bool replace()
ADOdb supports replace functionality, whereby the record is inserted if it does not exists, or updated otherwise.
The method returns
Value | Description |
---|---|
0 | failure |
1 | update |
2 | insert |
$rec = new ADOdb_Active_Record("product"); $rec->name = 'John'; $rec->tel_no = '34111145'; $ok = $rec->replace(); ADOdb_Active_Record::Load($where)