title: Use bind_param on the database name instead of just values
body: <p>I'm trying to bind a variable to my PHP prepared statement. However, I'm trying to apply it to the database name, not a value. This is what I have, which works:</p>
  <pre><code>$foo = 'foo';
  $con = mysqli_connect(connection_values);
  $query = &quot;INSERT INTO example (field) VALUES ?;&quot;;
  $stmt = mysqli_stmt_init($con);
  $stmt-&gt;prepare($query);
  $stmt-&gt;bind_param('s', $foo);
  $stmt-&gt;execute();
  </code></pre>
  <p>What I'm trying to do is something similar to this:</p>
  <pre><code>$foo = 'foo';
  $bar = 'bar';
  $con = mysqli_connect(connection_values);
  $query = &quot;INSERT INTO example_? (field) VALUES ?;&quot;;
  $stmt = mysqli_stmt_init($con);
  $stmt-&gt;prepare($query);
  $stmt-&gt;bind_param('ss', $bar, $foo);
  $stmt-&gt;execute();
  </code></pre>
  <p>This would insert <code>foo</code> into the table <code>example_bar</code>. However, trying this errors with</p>
  <blockquote>
  <p>mysqli_stmt::bind_param(): invalid object or resource mysqli_stmt</p>
  <p>mysqli_stmt::execute(): invalid object or resource mysqli_stmt</p>
  </blockquote>
  <p>Is this possible?</p>