Page:: delete()

Is a method to remove a record from both the display screen and the database of the user

Description

To reveal the entity and database name, de-structure this page's subject.

Get the selected table-row if any is selected and otherwise alert the user to make a selection

Get the primary key of the currently selected record .

Ensure that the entity name is enclosed with backticks and then formulate a SQL statement to perform the deletion.

Execute the delete query on the server and return the number of affected records.

Finally check if the deletion was successful, if not report an error(mutall_error).

Refresh the homepage to reflect/show the changes that have been carried out i.e. remove the row from the table in the user interface.