Hi,
At first I suggest to make a database backup.
There is a tool in /admin tools where you can "Run a PHP command" - you should unlock this on your installation,
then you have to obtain current parent company id and the new id.
It depends if you want to store information in RecordBrowser's history about record modification or you don't want.
To store history call such code:
$old_parent_id = 3;
$new_parent_id = 5;
$rs = new RBO_RecordsetAccessor('company');
foreach($rs->get_records(array('parent_company' => $old_parent_id)) as $rec) {
$rec->parent_company = $new_parent_id;
$rec->save();
}
Or to just modify in DB - without history:
$old_parent_id = 3;
$new_parent_id = 5;
DB::Execute('UPDATE company_data_1 SET f_parent_company=%d WHERE f_parent_company=%d', array($new_parent_id, $old_parent_id));
Second solution will be a lot faster than first.
Regards,
Adam