Close MySQL connection after select