refactor php code for returning db results to pdo oop servicecallform