I've implemented the Boostrap table to display data from my database on my admin page. I saved an array into a json file, and then used the following code to populate the table:
<div class=\"row\">
<div class=\"col-lg-12\">
<div class=\"panel panel-default\">
<div class=\"panel-heading\"> <a href='record_show.php?tselect=blog&typerec=newblog' class='btn btn-success'>Add Record</a></div>
<table data-toggle=\"table\" data-url=\"tables/data4.json\" data-sort-name=\"id\" data-sort-order=\"desc\" data-show-refresh=\"true\" data-show-toggle=\"true\" data-show-columns=\"true\" data-search=\"true\" data-select-item-name=\"toolbar1\" data-pagination=\"true\" >
<thead>
<tr>
<th data-field=\"id\" data-sortable=\"true\">ID</th>
<th data-field=\"header\" data-sortable=\"true\" >Header</th>
<th data-field=\"intro\" data-sortable=\"true\" >Introduction</th>
<th data-field=\"status\" data-sortable=\"true\" >Status</th>
<th data-field=\"seo\" data-sortable=\"true\" >SEO</th>
<th data-field=\"type\" data-sortable=\"true\" >Type</th>
<th data-field=\"date\" data-sortable=\"true\" >Date</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
The issue is that the Bootstrap table only sorts alphanumerically, for example (1,11,12,2,21,3) instead of numerically (1,2,3,11,12,21). Have you encountered this problem before? If so, how did you make the Bootstrap tables sort numerically?