Page:: merge()

Used to perform data cleaning through merging duplicates to a single record. This is done from the crud page where the currently checked records can be merged.

Description

Collect the data to merge:-

Convert the node-list keys to an array of key values.

For the merging, there must be at least two selected keys.

To retrieve the members to merge, formulate an SQL query from the checked records. And convert the names to backtick enclosed strings.

Compile the imerger structure.

Create a new object keeping in mind the merger class extends a baby.

Wait for the merging process to finish. The result is the primary key of the principal(main) that represents the merged members.

Use the principal to update the page and highlight the record if need be, wait for the page to refresh , then get the table-row that matches the principal and select it.