Warnung: file_put_contents(/home/www/web1/html/php_dev/test.txt) [function.file-put-contents]: failed to open stream: Permission denied in /home/www/web1/html/php_dev/sys/lib.activity.php (Zeile 58)
Anzahl von X Argumenten [Archiv] - PHP-Scripte PHP-Tutorials PHP-Jobs und vieles mehr

- Ad -
php-resource




Archiv verlassen und diese Seite im Standarddesign anzeigen :
Anzahl von X Argumenten


 
paddy
29-04-2002, 19:38 
 
Hi Leutz !

Ich hab mal wieder ne Frage :
Folgendermaßen schaut meine Table aus :

id | name | nmb
---------------------------------
1 | xyz1 | 1
2 | xyz1 | 6
3 | xyz1 | 3
4 | xyz1 | 2
5 | xyz1 | 3
6 | xyz1 | 4
...........

Wie muss ich jetzt vorgehen wenn ich abfragen will
welche zahlen und wieviele davon sich in in spalte nbm befinden .

-> so solls dann aussehen :

1x "1"
1x "6"
2x "3"
1x "2"
1x "4"

Die zahlen in Spalte nmb ändern sich -> also geht eine "Starre" abfrage mit Where nmb = 'x' nicht .

thanx :)

 
Troublegum
29-04-2002, 20:05 
 
SELECT count(nmb) as anzahl,nmb FROM tabelle GROUP BY nmb;

 
paddy
29-04-2002, 20:33 
 
Thanx :rocks:

- -

Alle Zeitangaben in WEZ +2. Es ist jetzt 17:49 Uhr.