title: Insert query using prepared-statement in mysql?
body: <p>I have an stored procedure like this:</p>
  
  <pre><code>SET @query = CONCAT('insert into tblcommodity (id , idname , count)values (',p1, p2,p3,')');
  PREPARE stmt FROM @query;
  EXECUTE stmt;
  DEALLOCATE PREPARE stmt;
  </code></pre>
  
  <p>But when I want to run it, it has this error:</p>
  
  <pre><code>&gt; Procedure execution failed 1136 - Column count doesn't match value
  &gt; count at row 1
  </code></pre>
  
  <p>and another thing is that when I just run the insert code it runs!</p>
  
  <p>plz help me.</p>