I just want to sort my table by ID number… how can I that with the simplest way? I want to sort that table by “1” “2” “3” automatically.. it will start 1 to 3 (from little one to bigger numbers.)
JavaScript
x
<table>
<tr>
<th>ID numbers</th>
<th>Names</th>
</tr>
<tr>
<td>1</td>
<td>haluk</td>
</tr>
<tr>
<td>2</td>
<td>betul</td>
</tr>
<tr>
<td>3</td>
<td>Erdem</td>
</tr>
<tr>
<td>5</td>
<td>Eylül</td>
</tr>
Thanks…
Advertisement
Answer
JavaScript
<?php
include('database_connection.php');
$sorgu = $baglanti->query("select * from makale ORDER BY ID;");
while ($sonuc = $sorgu->fetch_assoc()) {
?>
I added that code in front of my table and fetch_assoc my datas to my table.. than all ordered by ID numbers…