title: Update an ordinal column based on the alphabetic ordering of another column
body: <p>I have a table representing a system of folders and sub-folders with an ordinal <code>m_order</code> column.</p>
  
  <p>Sometimes sub-folders are sorted alphanumerically, others are sorted by date or by importance. </p>
  
  <p>I recently had to delete some sub-folders of a particular parent folder and add a few new ones. I also had to switch the ordering scheme to alphanumeric. This needed to be reflected in the <code>m_order</code> column. </p>
  
  <p>Here's an example of the table:</p>
  
  <pre><code>+-----+-----------+-----------+------------+
  | ID  | parent    |   title   | m_order    |
  +-----+-----------+-----------+------------+
  | 100 | 1         | docs      | 3          |
  | 101 | 1         | reports   | 2          |
  | 102 | 1         | travel    | 1          |
  | 103 | 1         | weekly    | 4          |
  | 104 | 1         | briefings | 5          |
  | ... | ...       | ...       | ...        |
  +-----+-----------+-----------+------------+
  </code></pre>
  
  <p>And here is what I want:</p>
  
  <pre><code>+-----+-----------+-----------+------------+
  | ID  | parent    |   title   | m_order    |
  +-----+-----------+-----------+------------+
  | 100 | 1         | docs      | 3          |
  | 101 | 1         | reports   | 4          |
  | 102 | 1         | travel    | 5          |
  | 200 | 1         | contacts  | 2          |
  | 201 | 1         | admin     | 1          |
  | ... | ...       | ...       | ...        |
  +-----+-----------+-----------+------------+
  </code></pre>