title: Syntax error near "COUNT (*)"?
body: <p>I'd like to do an interactive stored procedure 
  I mean, after execution the user should type a word </p>
  
  <p>I wrote this but it doesn't work..</p>
  
  <pre><code>DELIMITER $$
  
  DROP PROCEDURE IF EXISTS ric_forn$$
  CREATE PROCEDURE  ric_forn (IN nome_forn VARCHAR(100) , OUT msg VARCHAR(100))
  BEGIN
  DECLARE num_rec INT;
  
  IF (nome_forn = '') THEN 
      SET msg = "Attenzione il nome inserito non è valido !";
  END IF;
  
  SELECT COUNT (*) INTO num_rec FROM Fornitori WHERE Des_Fornitore = nome_forn;
  
  IF num_rec = 0 THEN
      SET msg = "Nessun record trovato !";
  
  ELSE
  
  SELECT Id_Fornitore,Des_Fornitore,Ind_Fornitore WHERE Des_Fornitore = nome_forn;
      SET msg = "Records trovati:";
  
  END IF;
  
  END$$
  
  DELIMITER ;
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use
    near '*) INTO num_rec FROM Fornitori WHERE Des_Fornitore = nome_forn;</p>
  </blockquote>