title: Invalid parameter number issue using pdo in mysql
body: <p>I have recently started doing mysql queries using pdo but I am getting the following error </p>
  
  <p>Warning: PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined</p>
  
  <p>My code is,</p>
  
  <pre><code>$conquery = $this-&gt;db-&gt;prepare("SELECT questions.quid,answers.catid,answers.ansid  
              FROM questions,answers where  questions.qtype  = ? and answers.userid = ? and (questions.quid = answers.quid)");
  
  $conquery-&gt;execute(array('questions.qtype' =&gt; 'concern','answers.userid' =&gt;$_SESSION['user_id'])); 
  </code></pre>