Error, “List has no rows for assignment to SObject”
It would be safer to do the following:
Player__c[] players = [SELECT Id from Player__c where Name = :username]; if (players.size() > 0) p = players[0].Id;
lazyload loading capitalizing 1st character of each word in a string