phpbar.de logo

Mailinglisten-Archive

[php] COUNT / DISTINCT

[php] COUNT / DISTINCT

Matthias Dierker mdierker_(at)_osnabrueck.netsurf.de
Mon, 29 May 2000 19:02:32 +0200


At 18:03 29.05.00 +0200, you wrote:

>  MySQL Error:    1064 (You have an error in your SQL syntax near
>                  'distinct ID ) as result from
>phpOpenCounter_accesslog'
>                  at line 1)


Laut Manual gibt es COUNT(DISCTINCT) erst ab Version 3.23.2:
D.1.3 Changes in release 3.23.2
 ...
 - COUNT(DISTINCT value,[value,...]) 


>Ich möchte an die Anzahl der Zeilen kommen, welche unterschiedliche
>Einträge im Feld ID haben.

mach doch:
 SELECT COUNT(*) FROM table GROUP BY id


Gruss
Matthias




php::bar PHP Wiki   -   Listenarchive