Trying to connect and print result from query