title: PHP PDO related: Update SQL statement not updating the content of the database
body: <p>I am trying to implement an update statement using a prepared statement in a <a href="http://en.wikipedia.org/wiki/PHP" rel="nofollow noreferrer">PHP</a> script, but it appears that it is not updating the record in the database and I am not sure why and so would appreciate if you can share some insights.</p>
  <h3>Code</h3>
  <pre><code>$query = &quot;UPDATE DatTable SET DF_PARTY_ID = :party_id,
            DF_PARTY_CODE = :party_code,
            DF_CONNECTION_ID = :connection_id WHERE DF_PARTY_ID = ':party_id'&quot;;
  $stmt = $this-&gt;connection-&gt;prepare($query);
  $stmt-&gt;bindValue(':party_id', $data[0], PDO::PARAM_INT);
  $stmt-&gt;bindValue(':party_code', $data[1], PDO::PARAM_INT);
  $stmt-&gt;bindValue(':connection_id', $data[2], PDO::PARAM_INT);
  $stmt-&gt;execute();
  </code></pre>
  <p><a href="https://stackoverflow.com/questions/2381474/how-to-remove-or-avoid-inserting-column-headers-when-importing-a-separated-value/2381490#2381490">Inspiring solution</a> leading to this approach. How can I fix this problem?</p>