title: Convert a binary to decimal using MySQL
body: <p>I am trying to construct a query in MySQL that concatenates a bunch of binary fields and then gives me the result as DECIMAL.</p>
  
  <p>e.g:</p>
  
  <pre><code>SELECT CONCAT (setting1, setting2, setting3) AS settings;
  </code></pre>
  
  <p>may gave me:</p>
  
  <pre><code>101
  111
  110
  </code></pre>
  
  <p>I want to pass this value to a function (convert? cast?) that will give me the corresponding DECIMAL value:</p>
  
  <pre><code>5
  7
  6
  </code></pre>
  
  <p>I've already tried a few combinations of <code>cast()</code> and <code>convert()</code> but haven't cracked it yet.</p>