dot-writeResultsToTable function

Internal function to write the check results to a table in the database. Requires write access to the database