title: The best data type to store 0, 1, null values
body: <p>I have three values: <code>0</code>, <code>1</code>, <code>NULL</code>. Now I want to know, what data type is fine for that column?</p>
  
  <p>But the way, <code>NULL</code> is default of that column <em>(in the database)</em> and I achieve <code>0</code> and <code>1</code> form parameter (get method) of URL. Something like this:</p>
  
  <pre><code>www.example.com/?q=param=0
  </code></pre>
  
  <p>And then</p>
  
  <pre><code>$var = isset($_GET['param']) ? $_GET['param'] : null;
  </code></pre>
  
  <p>And then</p>
  
  <pre><code>INSERT INTO table(col) values ($var);
  </code></pre>