title: PHP Prepare statement failure
body: <p>The Following code will display "12" on the screen. That is all. These echo numbers were added for debugging.</p>
  
  <p>It should Display "123" and insert into a MySQL database the variables in the statement.
  For some reason it just ends at the prepare statement. The fail() error check never getting called. Actually, nothing gets called after the prepare statement.</p>
  
  <p>I have been all over the site and believe I am doing everything required properly, but it is more then likely something I did.</p>
  
  <p>Can anyone tell me why the prepare statement is failing this way?</p>
  
  <pre><code>$query = "insert into member(mail, user, val) values (?, ?, ?)";
  $uuu = blah@blah.com;
  $hhh = Blah Williams;
  $val = 0;
  echo "1";
  if($stmt = $this-&gt;conn)
  {
      echo "2";
      $stmt-&gt;prepare($query) || $this-&gt;fail('MySQL prepare', $stmt-&gt;error);
      echo "3";
      $stmt-&gt;bind_param('ssi', $uuu, $hhh, $val)
          || $this-&gt;fail('MySQL bind_param', $stmt-&gt;error);
      $stmt-&gt;execute();
      if (!$stmt-&gt;execute()) 
      {
          if ($stmt-&gt;errno === 1062 /* ER_DUP_ENTRY */)
          {
              $this-&gt;fail('This username is already taken');
          }
          else
          {
              $this-&gt;fail('MySQL execute', $stmt-&gt;error);
          }
      }
  }
  else 
  {/*error check*/
      $this-&gt;fail('MySQL insert prepare failed', $stmt-&gt;error);
      return 0;
  }
  $stmt-&gt;close();
  return true;
  </code></pre>