title: PDO MYSQL insert statement not working (no error given)
body: <p>I have the below MySQL insert statements, the code runs, and PDO does not report any error messages, however the first statement does not save the data to the database (no new row in the address table) while the second fires fine.</p>
  
  <pre><code>$sql=$dbh-&gt;prepare("INSERT INTO `Address` (`ID`, `Street`, `Street2`, `Town`, `County`, `Postcode`) VALUES (NULL, ?,?,?,?,?)");
  
          $sql-&gt;execute(array($_POST['street'], $_POST['street2'], $_POST['town'], $_POST['county'], $_POST['postcode']));
  
          $addressID = $dbh-&gt;lastInsertId();
  
          $firmSQL = $dbh-&gt;prepare("INSERT INTO TaxiFirm (Name, LogoURL, AddressID, Phone, Email, LicenseExpiry, ContractDate, Active) VALUES (?, ?, ?, ?, ?, ?, ?, 1)");
          $firmSQL-&gt;execute(array($_POST['name'], $_POST['url'], $addressID, $_POST['phone'], $_POST['email'], $_POST['license'], $_POST['contract']));
  </code></pre>
  
  <p>The SQL for the Address table:</p>
  
  <pre><code>CREATE TABLE `Address` (
    `ID` int(11) NOT NULL,
    `Street` varchar(100) NOT NULL,
    `Street2` varchar(100) NOT NULL,
    `Town` varchar(100) NOT NULL,
    `County` varchar(100) NOT NULL,
    `Postcode` varchar(20) NOT NULL
  ) 
  
  ALTER TABLE `Address`   MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  ALTER TABLE `Address`
    ADD PRIMARY KEY (`ID`);
  </code></pre>
  
  <p>The result of <code>DESCRIBE Address;</code></p>
  
  <pre><code>ID  int(11) NO  PRI     auto_increment  
  Street  varchar(100)    NO              
  Street2 varchar(100)    NO              
  Town    varchar(100)    NO              
  County  varchar(100)    NO              
  Postcode    varchar(20) NO              
  </code></pre>
  
  <p>I can't see anything wrong with the code?</p>