![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 80 Pomógł: 0 Dołączył: 12.05.2005 Ostrzeżenie: (0%) ![]() ![]() |
Jak zrobić coś takiego - chce wyselekcjonować z bazy rekordy i obliczyć ilość wystąpień dla tylko unikalnych wpisów - nie powtórzeń.
Myślałem o czymś takim - ale nie działa:
Niestety nie działa - komunikat o użyciu GRUPY itd #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DISTINCT(`adres_ip`)' at line 1 (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) I jak to zrobić (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) Ten post edytował smarcz 26.06.2008, 00:22:50 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 1 085 Pomógł: 231 Dołączył: 12.05.2008 Ostrzeżenie: (0%) ![]() ![]() |
Distinct zawiera się przed FROM a po SELECT. Jeśli zamiast and DISTINCT adres_ip dasz GROUP by adres_ip to co się dzieje?
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 12.10.2025 - 17:57 |