using object-oriented style for database connection
getPlayerName function