Afişare date din MySQL în ordine alfabetică
Scris: Dum Feb 03, 2013
Bună!
Am acest cod care îmi afişează într-un tabel toate înregistrările din coloanele respective în ordinea înregistrărilor, adică după sortate după "id";
Ce ar trebui să fac să mi-le afişeze în ordine alfabetică, ascendent sau descendent!
Vă mulţumesc.
Toate bune.
Cod: Selectaţi tot
<?php
if (mysql_num_rows($result) == 0) {
?>
<p>Nu exista Marcaje inregistrate!</p>
<?php
} else {
?>
<table bgcolor="#0ea1b2" width="250px"border="1"bgcolor="#6495ED">
<tr>
<th width="12px">ID</th>
<th colspan="1"width="340px">Marcaje</th>
</tr>
<?php
while ($row = mysql_fetch_assoc($result)) {
?>
<tr>
<td width="10px"><?php echo $row['id']; ?> </td>
<td width="230px"><?php echo '<a style="text-decoration:none" target="blank" title="'.$row['URL'].'" href="'.$row['URL'].'">'.$row['numelink'].'</a> '?> </td>
</tr>
<?php
}
?>
<?php
}
?>
</table>
Ce ar trebui să fac să mi-le afişeze în ordine alfabetică, ascendent sau descendent!
Vă mulţumesc.
Toate bune.