title: How to know if insert query succeeded in stored proceedure?
body: <p>I am writing a stored procedure to create a player:</p>
  
  <pre><code>CREATE PROCEDURE `create_player` (
  firstName TEXT CHARACTER SET utf8,
  lastName TEXT CHARACTER SET utf8,
  username TEXT CHARACTER SET utf8,
  password TEXT CHARACTER SET utf8,
  email TEXT CHARACTER SET utf8,
  gender ENUM('m','f'),
  avatar INTEGER,
  OUT result INTEGER)
  BEGIN
  DECLARE insertVal INTEGER DEFAULT 0;
  
  INSERT INTO `Players` 
  (`PlayerFirstName`, 
  `PlayerLastName`, 
  `PlayerName`, 
  `PlayerPassword`, 
  `PlayerEmail`,
  `PlayerGender`, 
  `PlayerAvatar`, 
  `PlayerJoinDate`) VALUES (
   firstName,lastName,username,player_hash_password(password),email,gender,avatar,NOW());
  END
  </code></pre>
  
  <p>Say I wanted to let the user know if this insert succeeded or not, how can I find out if it succeeded or not (number of rows affected). I tried to set an integer variable = to the insert statement but that did not work.</p>
  
  <p>What is the typical way of error checking for stored procedures?</p>