Added selects and queryDatabase function. Selects finished, qD no.