appserver: fix sql error in update