Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004
    Posts
    3

    Unanswered: Allow only one user (or small list) permission to update a row in MySQL?

    Thanks for entertaining a Newbie:
    PHP 4, MySQL 4.0.20, Apache 1.3.

    Is there a way to allow only one user (or a small list) to update a row in MySQL?

    I'm trying to use a single database to maintain a users' personal information AND personal 'text entries' that will dynamically appear on the page. I only want them to be able to update their row.

    Any thoughts or am I approaching this the wrong way?

    Thanks
    Eric

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    That sounds like application level security (something you code into your web page or program) rather than database security (something you can set/manage via the database engine). Typically, all of the users will use a single database login, so the database doesn't "know" which user is connected, so you really can't manage row level security at that level... It needs to be done by the application.

    -PatP

  3. #3
    Join Date
    Jun 2004
    Posts
    3
    Thanks so much for your response, Pat-

    Do you have any resources where you could point me where I could learn about this topic?

    After the user logs in (and is checked against the registration database), I want PHP to prevent them from altering any records but their 'own'. If their login info was saved as a session/cookie, could the program 'know' which records they should have access to?

    Thanks again-
    Eric

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •