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