title: PHP Wrong parameter count for mysql_query() - Possible Syntax Error
body: <p>I've been battling with this for a while, I'm not familiar with PHP syntax, here's my code:</p>
  
  <pre><code>    $eventArray = array($this-&gt;ReturnLastRecordId() + 1, $managerid, $title, $description, $category, $address, $location, $startdate, $starttime, $enddate, $endtime, $price, $endofticketdate, $totalseats,  $totalseats);
      $sql = "INSERT INTO event (eventid, managerid, title, description, category, address, location, startdate, starttime, enddate, endtime, price, endofticketdate, totalseats, totalseats)";
      $data-&gt;StoreData($eventArray, $sql);
  </code></pre>
  
  <p>In the function:</p>
  
  <pre><code>public function StoreData($dataArray, $sqlquery)
      {
  
          include 'config.php';
  
          $i = count($dataArray);
          echo $i;
          switch ($i) {
              case 15:
              mysql_query($sqlquery . "VALUES (" . '$arraydata[0]' ,   '$arraydata[1]',  '$arraydata[2]',  '$arraydata[3]', '$arraydata[4]', '$arraydata[5]', '$arraydata[6]', '$arraydata[7]', '$arraydata[8]', '$arraydata[9]',  '$arraydata[10]', '$arraydata[11]', '$arraydata[12]',  '$arraydata[13]',  '$arraydata[14]' . ")", $con) or die (mysql_error());
              mysql_close($con);
                  break;
  
          }
      }
  </code></pre>
  
  <p>Obviously I've checked the number of parameters multiple times, including the database, but still the parameter count get thrown :(.</p>