title: Expand single row to multiple rows
body: <p>The following is an example of a two columns table, I use Bitwise Operators to store the days.</p>
  
  <pre><code>-- +---------+------+
  -- | Title   | Days |
  -- +---------+------+
  -- | Title 1 | 127  |
  -- | Title 2 |  12  |
  -- | Title 3 |   8  |
  -- | Title 4 |  36  |
  -- +---------+------+
  </code></pre>
  
  <p>What I want is to make a query and expand each row, so it is repeated based on the number of the days, and each row only contains one day.</p>
  
  <pre><code>-- +---------+------+
  -- | Title   | Days |
  -- +---------+------+
  -- | Title 1 |   1  |
  -- | Title 1 |   2  |
  -- | Title 1 |   4  |
  -- | Title 2 |   4  |
  -- | Title 4 |   4  |
  -- | Title 1 |   8  |
  -- | Title 2 |   8  |
  -- | Title 3 |   8  |
  -- | Title 1 |  16  |
  -- | Title 1 |  32  |
  -- | Title 4 |  32  |
  -- | Title 1 |  64  |
  -- +---------+------+
  </code></pre>
  
  <p>I already have a work around, by making the application query the database multiple times to retrieve the rows for each day.</p>
  
  <pre><code>SELECT * FROM `table_name` WHERE ( `days` &amp; 1 ) = 1; -- ... and so on
  </code></pre>
  
  <p>But I thought if I could do that in a single query that would speed up the performance.</p>