Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [MySQL] Sortowanie
Randallmaster
post
Post #1





Grupa: Zarejestrowani
Postów: 677
Pomógł: 11
Dołączył: 18.11.2009

Ostrzeżenie: (0%)
-----


Witam,

Mam kolumne z takimi wartościami np. status wartości (Y,W,N);

teraz wiersze mam w różnych kolejnościach i chciałbym posortować po kolumnie status aby wartości wyświetlały się w takiej kolejności

test 1 | Y
test 2 | Y
test 3 | Y
test 4 | W
test 5 | N
test 6 | N

jak zrobić order by wyszło takie coś ? (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




order by pole desc
Go to the top of the page
+Quote Post
Randallmaster
post
Post #3





Grupa: Zarejestrowani
Postów: 677
Pomógł: 11
Dołączył: 18.11.2009

Ostrzeżenie: (0%)
-----


Cytat
order by pole desc


sortuje tak jak on chce czyli według alfabetu (IMG:style_emoticons/default/smile.gif) A jak chciałbym po swojej kolejności? (IMG:style_emoticons/default/smile.gif)

poradziłem sobie:

order by field (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 14:52