; mysql@lists.mysql.com
Subject: Re: Complex SQL for multiple joins
Also, depending on the number of permissions you are tracking, you could
use a single INT field and do bitwise ORing in your application to
determine permission checks...
Though I usually don't recommend denormalizing the sch
Also, depending on the number of permissions you are tracking, you could
use a single INT field and do bitwise ORing in your application to
determine permission checks...
Though I usually don't recommend denormalizing the schema, this is one
scenario that would potentially make life a bit easier.
You should be able to do it 1 query, I can think of two ways. I'm not sure which one will run faster. I use table aliasing to keep
the lines shorter.
The first possibility would have user permissions in one column and group
permissions in another:
SELECT users.userid,perm_u.permissions,perm_g.p