Re: [PHP] user permissions

2009-08-27 Thread Robyn Overstreet
This is where binary is actually helpful. You can store each
task/permission as a bit, ie, as a yes or no piece of data.

For example: read, write, edit, moderate ... a user with read/write
permissions only would be represented by: 1100, which in decimal is
12. So in effect, you're storing 4 values in one integer.

If you wanted to create a table to serve as a key to the permission
level codes, you could do that as well.

RO

On Wed, Aug 26, 2009 at 11:55 PM, John wrote:
> Hi,
>
>
>
> What is the best way to assign permissions to users?
>
>
>
> a)      Each user has a list of permissions associated with that user or
>
> b)      Each task/permission has a list of users that qualify or
>
> c)       Have a table with a row for each user/permission combination
>
>
>
> Thanks!
>
>
>
> John
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php/sqlite3

2009-07-08 Thread Robyn Overstreet
Did you try connecting using a PDO object instead of sqlite_open? I'm
not positive, but it looks like the sqlite_  only work with sqlite2
...

R

On Wed, Jul 8, 2009 at 2:55 PM, bruce wrote:
> hi...
>
> i've got an issue where i'm trying to incorporate sqlite3 into my php.
>
> i'm running fedora 9, php5.2.9.
>
> the php app was  installed using the tun install process...
>
> i know the docs say that php5+ is supposed to have sqlite incorporate
> natively...
>
> however, on this box, it doesn't! when i do a phpinfo(), i get the pdo
> stuff, but not the sqlite.
>
> i went ahead and followed a thread on the php.net that walked through adding
> sqlite3, using the phpize, and managed to create the sqlite3.so...
>
> the phpinfo now has a sqlite section, with a sqlite3.extension_dir that
> points to the dir that contains the sqlite3.so..
>
> however, when i run a test app using "sqlite_open", i'm getting an error
> saying that the "sqlite_open" is undefined...
>
> so... my question..
>
> how the heck can i resolve this issue!
>
> thanks..
>
> -bruce
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php