title: How do I store a BIGINT in MySQL using PDO?
body: <p>I know this question has been asked more than once here, but I couldn't find a solution. </p>
  
  <p>We are using a database where we are storing the facebook id as a BIGINT(20).</p>
  
  <pre><code>create table users(
       fb_id bigint(20) NOT NULL,
       user_name varchar(30) NOT NULL,
       CONSTRAINT uk_name unique (user_name), 
       CONSTRAINT pk_fb_id primary key (fb_id)
  )ENGINE=INNODB;
  </code></pre>
  
  <p>But the PDO engine of PHP can insert only the max integer value of PHP, i.e. 2147483647.</p>
  
  <pre><code>$stmt-&gt;bindParam(':fb_id', $this-&gt;fb_id, PDO::PARAM_INT);
  </code></pre>
  
  <p>This, I understand, is quite obvious since we are limited by the maximum value of integer in PHP. I tried to use the string -</p>
  
  <pre><code>$stmt-&gt;bindParam(':fb_id', $this-&gt;fb_id, PDO::PARAM_STR);
  </code></pre>
  
  <p>but still it doesn't work.</p>
  
  <p>I want to know if there could be a workaround to store it as bigint.</p>