test static server and fixed a sql query bug.