php-windows Digest 6 Sep 2010 09:38:49 -0000 Issue 3860

Topics (messages 30318 through 30323):

Re: [PHP-DB] Select the specific user data from the database
        30318 by: Phpster
        30320 by: nagendra prasad
        30321 by: Phpster

Is this syntax is correct?
        30319 by: nagendra prasad

Re: [PHP-DB] Is this syntax is correct?
        30322 by: Niel Archer

Re: Select the specific user data from the database
        30323 by: Richard Quadling

Administrivia:

To subscribe to the digest, e-mail:
        php-windows-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-windows-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-wind...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
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 <nagendra802...@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.

--- End Message ---
--- Begin Message ---
PS: Want to check the username from a table and the password from another
table.

Is it possible ??

--- End Message ---
--- Begin Message ---
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 <nagendra802...@gmail.com> wrote:

> PS: Want to check the username from a table and the password from another 
> table.
> 
> Is it possible ??
> 
> 

--- End Message ---
--- Begin Message ---
Hi All,

Is this syntax is correct??

SELECT username FROM data, password FROM registration WHERE username=%s AND
password=%s"


Best,
Guru.

--- End Message ---
--- Begin Message ---
> Hi All,
> 
> Is this syntax is correct??
> 
> SELECT username FROM data, password FROM registration WHERE username=%s AND
> password=%s"

No, it is not.
This list is for Windows based PHP matters. You will find far more
knowledgeable people (so more responses) by asking on the appropriate
list, i.e.  php...@lists.php.net for database related PHP matters, or an
SQL list/forum for SQL problems.

http://dev.mysql.com/doc/refman/5.1/en/select.html

You seem to be trying to do a JOIN

> Best,
> Guru.

--
Niel Archer



--- End Message ---
--- Begin Message ---
On 5 September 2010 12:21, nagendra prasad <nagendra802...@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

--- End Message ---

Reply via email to