From: nagendra prasad on
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.
From: Phpster on
Then each record needs to have a user filed where their is stored. Then your access query just adds an additional filter to check this value

Select * from data_table where user = $user

Bastien

Sent from my iPod

On Sep 5, 2010, at 7:21, nagendra prasad <nagendra802000(a)gmail.com> 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.
From: nagendra prasad on
PS: Want to check the username from a table and the password from another
table.

Is it possible ??
From: Phpster on
I would suggest that you keep authorization separate from data access

Bastien

Sent from my iPod

On Sep 5, 2010, at 9:19, nagendra prasad <nagendra802000(a)gmail.com> wrote:

> PS: Want to check the username from a table and the password from another table.
>
> Is it possible ??
>
>
From: Richard Quadling on
On 5 September 2010 12:21, nagendra prasad <nagendra802000(a)gmail.com> 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