select count(*), category from posts group by category
or
select count(*) from posts group by category where category = 'foobar'
should do the trick.
regards, mike.
--
mfG, Michael Kumar (michael.kumar_at_nme.at, m.kumar_at_hushmail.com)
PGP: 30FE 3AB9 5077 C554 5D9E B5CC 0B0F
dang, messed up the order of statements, sorry.
of course it must read:
select count(*) from posts where category = 'foobar' group by category
regards, mike.
--
mfG, Michael Kumar (michael.kumar_at_nme.at, m.kumar_at_hushmail.com)
PGP: 30FE 3AB9 5077 C554 5D9E B5CC 0B0F CFB2
, which means you should put most effort in optimizing the
queries.
regards, mike.
--
mfG, Michael Kumar (michael.kumar_at_nme.at, m.kumar_at_hushmail.com)
PGP: 30FE 3AB9 5077 C554 5D9E B5CC 0B0F CFB2 55D6 AA75
.: know your nme :.
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
says...