- $db->query("UPDATE workdone SET thisdone='$up_editsub', manydone=" . count(explode(",",$up_editsub)) . ",tstamp=$up_tstamp WHERE mnumber=$up_mnumber AND session=$up_sessionid");
+ $db->query("DELETE FROM workdone WHERE mnumber=$up_mnumber AND session=$up_sessionid");
+ $db->query("INSERT INTO workdone (session,mnumber,thisdone,manydone,tstamp) values ($up_sessionid,$up_mnumber,\"$up_editsub\",$up_manydone,$up_tstamp)");