Jump to content
php.lv forumi

mysql rows order


kapec gan ne

Recommended Posts

mysql> select * from `table`;
+----+--------+
| id | name   |
+----+--------+
|  1 | aaaaaa |
|  2 | bbbbb  |
|  3 | ccccc  |
|  4 | ddddd  |
|  5 | eeeee  |
|  6 | wwwww  |
|  7 | ggggg  |
|  8 | hhhh   |
|  9 | uuuu   |
| 10 | iiiii  |
| 11 | gggg   |
| 12 | dddd   |
| 13 | sssss  |
| 14 | aaaaa  |
| 15 | jjjj   |
| 16 | uuuuu  |
| 17 | rrr    |
| 18 | mmmmm  |
+----+--------+

 

vajag izvadīt visu šo izvadīt html selectā, bet tā, lai piem.

ieraksts ar `name`='hhhh' būtu pirmais un pēc tam pārējie tikai.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...