Re: Fetch one more column in the grouptable..
Lukas Kahwe Smith <[email protected]> Thu, 03 Nov 2005 17:01:50 +0100
| Newsgroups | gmane.comp.php.pear.liveuser |
|---|---|
| Message-ID | <[email protected]> |
Jan Bolmeson (Ivtaco) wrote:
> Hi again,
>
> Just a quickee; I have the following code which fetches a single group and
> works well.
>
> $options['filters'] = array('group_id' => $group_id);
> $this->admin->perm->getGroups($options);
>
> Now the thing is that I have one more column in the grouptable that I would
> like the getGroups-function to include in the result. But no matter how I
> try I cannot seem to get it work.
>
> I have tried (among other things):
>
> $options['fields'] = array('name_of_my_column' => true);
>
> And with different combination of "table","alias" and other subarrays but I
> obviously doing something wrong =/
If you do not set 'fields', it simply fetches all fields defined in the
schema for the given table. alternatively you can list the fields
explicitly as an array with numeric keys.
So the thing to do for you is to add the field to the schema. You do
this just like in the examples:
http://cvs.php.net/co.php/pear/LiveUser/docs/examples/example4/conf.php
in this example we add 4 fields to the user table in the auth container ..
regards,
Lukas