Re: Filtering problems with getUsers

Lukas Smith <[email protected]>
Newsgroups gmane.comp.php.pear.liveuser
Organization BackendMedia GbR
Message-ID <[email protected]>
Dan Rossi wrote:
> Hi i'm prob trying to push the boundaries here, but what i am trying to 
> achieve is with getUsers obtain the groups the user is joined to so i 
> can create a groups muitiple list form and have them selected in the 
> list. Now I cant see any possible way to do this.
> 
> I have run into problems building a menu from getGroups, what it returns 
> is a heap of fields aswell as its in a 2-dimensional array here is what 
> I have to do at the moment to preformat the array to build a quickform 
> list with, the preg_replace is to format the define_name from ADMIN_AREA 
> to Admin Area, it would be nice if there was also a title group areas, 
> groups and rights etc ..

I really need to write a guide to filtering ..

anyways go through the admin example 1. it shows off most ways in which 
you can filter. suffice it to say you can filter using in statements, 
any comparision operator. however you can only AND multiple filters.

aside from that you can choose the fields you want returned
and you can choose if you want a single value, column or row .. or even 
all the data (which is the default).
if you get all data you can choose to have the first column as the key 
in the first dimension etc etc.

finally with the "with" key you can fetch additional data about rows you 
have fetched.

regards,
Lukas Smith
[email protected]
_______________________________
   BackendMedia
   www.backendmedia.com
   [email protected]

   Linn Zwoch Smith GbR
   Pariser Str. 44
   D-10707 Berlin

   Tel +49 30 83 22 50 00
   Fax +49 30 83 22 50 07
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.