Re: Auth and joins
| From: | Gerard Bowe | Date: | Tue, 15 Nov 2005 11:42:02 +0000 |
| Subject: | Re: Auth and joins | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21931@lists.php.net to get a copy of this message | ||
Graham Clarke wrote:
What if you create a view to the data you want? So your options array would be something like this -- $options = array(I have the $options set up as above, but with fields from only one table. I would like to be able to all the data (username, id, groups, etc) and register it in the session, with just one call to the database? Ger'table' => 'myUserView','usernamecol'=> 'username', 'passwordcol'=> 'password','userid' => 'userid', 'db_fields' => [LIST OF COLUMNS YOU WANT STORED IN THE SESSION], 'dsn' => YOUR_DSN); Graham Gerard Bowe wrote:Is it possible to do a join with the Auth package (or send raw sql). I have three tables Users, Groups and UserGroups (a user may belong to one or more groups). I would like to get the group(s) when the user logs in and and register them in the SESSION. Thanks gerSorry, but I'm not sure what you mean by create a view?