Write report to mysql - not ready yet - need testing