title: PHP PDO UPDATE table not working
body: <p>I'm using the PHP PDO's to insert and update values in a table.
  The insertion works fine. But when i try to update, nothing happens.
  I get no errors, no exceptions.</p>
  
  <p>the code is </p>
  
  <pre><code>   $sql="UPDATE customers SET Name=:name,Company=:company,Address=:address,City=:city,State=:state,Country=:country,MainP=:phonem,CellP=:phonec,Email=:email,Action=:action WHERE CompanyID=:cid";
  </code></pre>
  
  <p>and the rest:</p>
  
  <pre><code>               $stmt = $dbh-&gt;prepare($sql);
                   $stmt-&gt;bindParam(":name",$name);
                  $stmt-&gt;bindParam(":company",$company);
                  $stmt-&gt;bindParam(":cid",$customer_id);
                  $stmt-&gt;bindParam(":address",$address);
                  $stmt-&gt;bindParam(":city",$city);
                  $stmt-&gt;bindParam(":state",$state);
                  $stmt-&gt;bindParam(":country",$country);
                  $stmt-&gt;bindParam(":phonem",$main_num);
                  $stmt-&gt;bindParam(":phonec",$cell_num);
                  $stmt-&gt;bindParam(":email",$email);
              $stmt-&gt;bindParam(":action",$action);
              $stmt-&gt;execute();
             echo $stmt-&gt;rowCount();
  </code></pre>
  
  <p>So, is there something I am doing wrong?</p>
  
  <p>EDIT: Forgot to mention that i am getting a row count of 0. And I've tried without the quotes. It still doesnt work</p>
  
  <p>EDIT: Just found out that customer_id is being returned as 0 froma nother function.
  Thanks for the help.</p>