title: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in PDO Insert Query
body: <p>I am using PDO to execute a insert query but it is throwing me this error I am not able to understand what the problem is! Please help me out! thank you in advance:)</p>
  <pre><code>    $count_query_params = [$fromDate, $toDate, $TRNO];
      $count_query = &quot;INSERT INTO `$HA_ENTRIES`(`fromDate`, `toDate`, `user_trno`) VALUES (?,?,?)&quot;;
      $count_row = db_query_all($count_query_params, $count_query);
  </code></pre>
  <p><code>// DB_Query_ALL function</code></p>
  <pre><code>function db_query_all($arrayParams, $query)
  {
  global $conn;
  
  $result = $conn-&gt;prepare($query);
  foreach ($arrayParams as $param) {
      $result-&gt;execute([$param]);
  }
  
  $rows = array();
  while ($row = $result-&gt;fetch()) {
      $rows[] = $row;
  }
  if (count($rows) &lt; 1) {
      $rows = false;
  }
  return $rows;
  </code></pre>
  <p>}</p>
  <p><b>Fatal error</b>:  Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in......</p>
  <p>db_query_all(Array, 'INSERT INTO `14...')
  #2 {main}.....</p>