in reply to Adding an element to an array
If you're pulling data from an SQL database, the best approach may be to let the database do the work for you; SQL has a COUNT aggregate function. Something along the following lines, perhaps:
SELECT Name, COUNT(Home) AS HomeCount FROM People GROUP BY Name;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Adding an element to an array
by Anonymous Monk on Oct 14, 2015 at 19:24 UTC | |
by Pope-O-Matik (Pilgrim) on Oct 14, 2015 at 23:56 UTC |