Mysql
Marco
- datenbank
Hallo alle zusammen!
Kann ich folgendes in eine Mysql-Abfrage packen:
Select count(*) as count from table where feld=0
Select count(*) as count2 from table where feld=1
Marco
Moin Moin !
select feld,count(*) from ... group by feld
könnte funktionieren. Details findest Du in der MySQL-Doku.
Alexander
Halihallo Marco
Kann ich folgendes in eine Mysql-Abfrage packen:
Select count(*) as count from table where feld=0
Select count(*) as count2 from table where feld=1
Ja:
SELECT COUNT(*) AS count, feld FROM table GROUP BY feld HAVING feld=0 OR feld=1
Viele Grüsse
Philipp
Hallo Philipp,
hat geklappt.
Vielen Dank, im Mysql-Manual zu suchen, war mir etwas zu viel.
Marco