Re: Select the specific user data from the database

From: Date: Mon, 06 Sep 2010 09:38:20 +0000
Subject: Re: Select the specific user data from the database
References: 1  Groups: php.db php.windows 
Request: Send a blank email to php-db+get-47361@lists.php.net to get a copy of this message
On 5 September 2010 12:21, nagendra prasad <nagendra802000@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

« previous php.db (#47361) next »