Re: grouping query results
| От | Mitch Pirtle |
|---|---|
| Тема | Re: grouping query results |
| Дата | |
| Msg-id | 330532b605022810144884dd42@mail.gmail.com обсуждение исходный текст |
| Ответ на | grouping query results ("Joolz" <joolz@arbodienst-limburg.nl>) |
| Список | pgsql-php |
On Mon, 28 Feb 2005 10:48:23 +0100 (CET), Joolz <joolz@arbodienst-limburg.nl> 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
В списке pgsql-php по дате отправления: