title: PDO output parameter error
body: <p>I am using this SP, am getting both the result when using mysql workbench.</p>
  
  <pre><code>CREATE PROCEDURE SP(IN _start INT,IN _end INT,INOUT _count INT)
  BEGIN
  
     SET _count = (SELECT COUNT(*) FROM tbl);
  
     SET @qry = CONCAT('select * from tbl limit ', _start, ',', _end);
  
     PREPARE stmt FROM @qry;
     EXECUTE stmt;
     DEALLOCATE PREPARE stmt;
  
  END
  </code></pre>
  
  <p>But when using with PDO am returning this error</p>
  
  <pre><code>$c=0;
  $stmt = $this-&gt;_dbc-&gt;getConnection()-&gt;prepare("CALL SP(0,10,:count)");
      $stmt-&gt;bindParam(":count",$c,PDO::PARAM_INT|PDO::PARAM_INPUT_OUTPUT,0);
      $stmt-&gt;execute();
      return $c;
  PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1414 OUT or INOUT argument 3 for routine db22.SP is not a variable or NEW pseudo-variable in BEFORE trigger
  </code></pre>
  
  <p>But on changing</p>
  
  <pre><code>$this-&gt;_dbc-&gt;getConnection()-&gt;prepare("CALL SP(0,10,**:count**)");
  </code></pre>
  
  <p>to</p>
  
  <pre><code>$this-&gt;_dbc-&gt;getConnection()-&gt;prepare("CALL SP(0,10,@count)");
  </code></pre>
  
  <p>am not returning any error, but always getting the count as 0.</p>
  
  <ol>
  <li>Whats the difference between :count and @count ?</li>
  <li>How to get exact count via pdo ?</li>
  </ol>