title: Prepared Statements Mysql
body: <p>I have a prepared statement I want to execute direct to the MySQL server; </p>
  
  <pre><code>USE `testdb`;
  SET @t = (
      SELECT GROUP_CONCAT(mytab.TABLE_NAME SEPARATOR ', ') 
      FROM (SELECT * FROM information_schema.TABLES as `m` WHERE table_schema = 'testdb' AND table_name LIKE 'mi_%' LIMIT 0,1) as `mytab`
      );
  PREPARE `stmt1` FROM 'DROP TABLE t';
  EXECUTE `stmt1` USING @t;
  DEALLOCATE PREPARE `stmt1`;
  </code></pre>
  
  <p>However, when I execute it returns an error on the EXECUTE line saying </p>
  
  <blockquote>
    <p>Error Code: 1210. Incorrect arguments to EXECUTE</p>
  </blockquote>
  
  <p>I would appreciate any help on what I'm doing wrong. </p>
  
  <p>I have mysql version 5.1.68</p>