I am trying to achieve a strange query. I have a table like this:
table People
-----------------------
| id | name | family |
+----+------+--------+
| 1 | Bob | Smith |
+----+------+--------+
| 2 | Joe | Smith |
----------------------
I want to return an assoc array like this
id : 1
name : bob
family : smith
familySize : 2
So something like this
"SELECT id, name, family, familySize FROM People"
How can I get the familySize in there? Keep in mind my query may have many families and I want them all to be returned.
Thank you.