Have a look at multicolumn environments. The specification is currently a candidate recommendation, so it shouldn't change that much. Keep in mind that this isn't implemented in IE prior to version 10, however there's a JavaScript fallback which should work, even on lists.
<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
<li>Item 5</li>
<li>Item 6</li>
<li>Item 7</li>
<li>Item 8</li>
<li>Item 9</li>
</ol>
ol{
-moz-column-count:2;
-webkit-column-count:2;
column-count: 2;
}
Note that you have to specify the actual amounts of columns somewhere. However, if every record of your SQL query equals one item you can just use something like count($result)/5
.
Demo