updated SQL to work with chat server and client