Re: Select the specific user data from the database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5 September 2010 12:21, nagendra prasad <nagendra802000@xxxxxxxxx> wrote:
> Hi Experts,
>
> I have a mysql database. What I want is that when a user login he can able
> to see his entries only, so that he can delete, add or edit his entries
> only. I have 2 different tables one for user details and another for actual
> entries. Please help me.
>
> Best,
> Guru.
>

If userA's and userB' data are both in the same table, do or will you
have issues with key fields?

I don't know what the data is, but you would need to include some
element of the user in every unique constraint.

Depending upon the data, another option is to have a separate table or
database per user. This allows for user permissions to be assigned to
the table or database.

I've used this mechanism when users data needs to be sync across
multiple devices and the device initiating the sync was always the
most uptodate. Cloning a table was far easier.

Richard.


-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

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



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux