postgresql groups and users

From: Date: Wed, 05 Sep 2001 11:47:51 +0000
Subject: postgresql groups and users
Groups: php.db 
Request: Send a blank email to php-db+get-12164@lists.php.net to get a copy of this message
for my application in php I connect with a postgresql database. In this database I have made users and groups, where 1 user can be the member of many groups (n on m relation) That works, but how do I let php find out if a user is a member of a certain group? I tried to get the relation out of the database and that worked, as far as that I got a list like { group1, group2, group3 } (it's been a while, and I write this from heart) A solution (I was not happy with) was making users, and create a special table with users and a table with groups and create a table that has both user and group as the primary key, so there was a n on m relation possible. In the group database I put a username and password (which is why I don't like the solution) that should log into the database. The whole reason is that I create buttons, and people who don't have the rights should not even see the buttons... Anyone who can help me out?

« previous php.db (#12164) next »