Added update functionality. Untested in app, PHP tested.
Also fixed logic bug in game select query.