implements sending update queries - and returns a sensible code for other query actions