pdo class for accessing mysql database