Dynamically SELECT fields from table

What is the matter with what you already have http://www.sitepoint.com/community/t/passing-an-id-to-query-where-in-a-table/105606/11.

As far as I can tell output would be something like this.

Array
(
    [0] => Array
        (
            [userid] => 1
            [effort] => 3
        )

    [1] => Array
        (
            [userid] => 1
            [effort] => 4
        )

)