On Mon, 28 Feb 2005 10:48:23 +0100 (CET), Joolz <joolz@xxxxxxxxxxxxxxxxxxxxx> wrote: > > I have the feeling that this is a very common question, how do you > people handle it? I looked at a lot of script sites, but no luck. What I do is run a single query for all employees, then iterate over the array in PHP for the counts. The alternative of running several queries seems a bit heavy-handed to me, but that is because I am always trying to make life easier for the database server :-) Note that many database libraries (PEAR::DB, ADOdb) also have capabilities of returning counts of recordsets, so with two queries you would be done. But I still like the first approach, as it is not tied to the database or require external libraries to support. -- Mitch