Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> last() first()
psw779
post
Post #1





Grupa: Zarejestrowani
Postów: 39
Pomógł: 0
Dołączył: 25.03.2006

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


Witam!

Po prostu jestem w szoku,

buduję najprostsze zapytanie w którym chce użyć LAST lub FIRST i nie działa. Wersje serwera nowe, spokojnie powinno chodzić a tu zonk.

SELECT FIRST(galleries.id) FROM galleries

za to np.:

SELECT AVG(galleries.id) FROM galleries

śmiga aż miło.

Ma ktoś jakiś pomysł?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
psw779
post
Post #2





Grupa: Zarejestrowani
Postów: 39
Pomógł: 0
Dołączył: 25.03.2006

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


zobacz tutaj:

http://www.w3schools.com/sql/sql_func_first.asp
Go to the top of the page
+Quote Post
phpion
post
Post #3





Grupa: Moderatorzy
Postów: 6 072
Pomógł: 861
Dołączył: 10.12.2003
Skąd: Dąbrowa Górnicza




Cytat(psw779 @ 9.02.2009, 23:06:05 ) *

A ty tutaj:
http://bugs.mysql.com/bug.php?id=2020
Cytat
I wonder why there is no FIRST and LAST aggregate functions in MySql. Somebody told me
this impossible because MySql save data in B-tree and returned set is unordered.
Go to the top of the page
+Quote Post

Posty w temacie


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: 10.10.2025 - 18:35