Hello,
Let us suppose I have to deal with lots of grandmothers that have lots of cats. I have a table granny_cat :
granny_id | kitty_name
--------------------
1 Kizzy
1 Jimmy
1 Katty
2 Georges
2 Albert
3 Panther
and I want to retrieve a list of granny 1 cat's, i.e. to get something like (with php syntax)
array("Kizzy","Jimmy","Katty")
However, the query
SELECT kitty_name WHERE granny_id = 1
returns something like
array
(
array('kitty_name' => "Kizzy"),
array('kitty_name' => "Jimmy"),
array('kitty_name' => "Katty")
)
what is quite logical, as I can fetch two, or more fields with a similar query. I can obviously map this array to get what I want, however, I wonder whether there is a (simple) way to get it directly from mysql, or not.
Thanks.