phpbar.de logo

Mailinglisten-Archive

[php] mysql, anzahl zeilen...

[php] mysql, anzahl zeilen...

Kristian =?iso-8859-1?Q?K=F6hntopp?= kk_(at)_netuse.de
Thu, 02 Dec 1999 13:00:39 +0100


Markus Dobel wrote:
> SELECT COUNT(DISTINCT MasterID) FROM All_Reports;
> SELECT COUNT(DISTINCT MasterID FROM All_Reports);

http://www.tcx.se/Manual_chapter/manual_Reference.html#Group_by_functions

COUNT(DISTINCT expr,[expr...]) 
     Returns a count of the number of different values. 

     mysql> select COUNT(DISTINCT results) from student;

     In MySQL you can get the number of distinct expressions 
     combinations by giving a list of expressions.
     In ANSI SQL you would have to do a concatenation of 
     all expressions inside CODE(DISTINCT ..). 

---

Was sagt denn "SELECT VERSION() as v" bei Dir?

Kristian

-- 
Kristian Köhntopp, NetUSE Kommunikationstechnologie GmbH
Siemenswall, D-24107 Kiel, Germany, +49 431 386 436 00
Using PHP3? See our web development library at
http://phplib.netuse.de/ (We have moved! Update your bookmarks!)


php::bar PHP Wiki   -   Listenarchive