Move delete and update out
Update to use queryMsql()