working sql and xmpp