Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [MySql]sortowanie
webmasts
post 31.12.2006, 14:34:28
Post #1





Grupa: Zarejestrowani
Postów: 55
Pomógł: 0
Dołączył: 5.11.2006
Skąd: Bochnia

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


jak zrobić żeby wyniki z bazy danych były wyswietlane w kolejności od najnowszych do starszych (z odwrotną niź domyslna)


--------------------
Darmowe gry java
Baza telefonów
Go to the top of the page
+Quote Post
skowron-line
post 31.12.2006, 14:46:05
Post #2





Grupa: Zarejestrowani
Postów: 4 340
Pomógł: 542
Dołączył: 15.01.2006
Skąd: Olsztyn/Warszawa

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


order by nazwa DESC


--------------------
I'm so fast that last night I turned off the light switch in my hotel room and was in bed before the room was dark - Muhammad Ali.
Peg jeżeli chcesz uprawiać sex to dzieci muszą wyjść, a jeżeli chcesz żeby był dobry ty też musisz wyjść - Al Bundy.

QueryBuilder, Mootools.net, bbcradio1::MistaJam
http://www.phpbench.com/
Go to the top of the page
+Quote Post
webmasts
post 31.12.2006, 15:17:51
Post #3





Grupa: Zarejestrowani
Postów: 55
Pomógł: 0
Dołączył: 5.11.2006
Skąd: Bochnia

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


Chodzi mi o to żeby były wyświetlane według kolejności dodania rekordów tyle że od najnowszego do najstarszego.


--------------------
Darmowe gry java
Baza telefonów
Go to the top of the page
+Quote Post
Cysiaczek
post 31.12.2006, 15:20:13
Post #4





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




To wyciągaj przez pole daty: ORDER BY pole_daty DESC
ewentualnie wg. unikalnego pola indexu (id, nr etc)

Pozdrawiam.

Ten post edytował Cysiaczek 31.12.2006, 15:20:59


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post
webmasts
post 31.12.2006, 15:35:30
Post #5





Grupa: Zarejestrowani
Postów: 55
Pomógł: 0
Dołączył: 5.11.2006
Skąd: Bochnia

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


Mógłbyś trochę to rozwinąć, bo coś mi nie wychodzi?? ”pole_daty” questionmark.gif A unikalnego parametru niestety nie mam.


--------------------
Darmowe gry java
Baza telefonów
Go to the top of the page
+Quote Post
henio
post 31.12.2006, 15:37:35
Post #6





Grupa: Zarejestrowani
Postów: 237
Pomógł: 1
Dołączył: 15.10.2004
Skąd: Lublin

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


Napisz jakie kolumny masz z bazie danych
Go to the top of the page
+Quote Post
Cysiaczek
post 31.12.2006, 15:37:50
Post #7





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




Tu nie ma co rozwijać, tylko poczytać : ) http://php.webhelp.pl/kursy/mysql/pliki/2....=php#sortowanie

Pozdrawiam.


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post
skowron-line
post 31.12.2006, 15:38:28
Post #8





Grupa: Zarejestrowani
Postów: 4 340
Pomógł: 542
Dołączył: 15.01.2006
Skąd: Olsztyn/Warszawa

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


dodaj sobie pole id na tabeli auto_increment zeby samo nadawalo id i potem przy wyswietlanu dajesz order by id desc

Ten post edytował skowron-line 31.12.2006, 15:38:50


--------------------
I'm so fast that last night I turned off the light switch in my hotel room and was in bed before the room was dark - Muhammad Ali.
Peg jeżeli chcesz uprawiać sex to dzieci muszą wyjść, a jeżeli chcesz żeby był dobry ty też musisz wyjść - Al Bundy.

QueryBuilder, Mootools.net, bbcradio1::MistaJam
http://www.phpbench.com/
Go to the top of the page
+Quote Post
webmasts
post 31.12.2006, 15:57:18
Post #9





Grupa: Zarejestrowani
Postów: 55
Pomógł: 0
Dołączył: 5.11.2006
Skąd: Bochnia

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


Dzięki


--------------------
Darmowe gry java
Baza telefonów
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 14:31