View Full Version : SELECT but not UPDATE
08-10-2006, 07:42 AM
If I have used SELECT to review a row of data from a table and then only want to allow it to UPDATE certain fields, even if the other fields were changed, would I use the UPDATE command, and choose which fields can be updated? Will this stop the other fields from being updated? I am trying to prevent people from changing certain values in the table.
08-10-2006, 03:06 PM
Yeah, the UPDATE will only change the fields that you tell it to in the SET part of the query.
08-10-2006, 03:19 PM
If the users have UPDATE privileges on the table then they can set whatever columns they want.
What you can do though is set individual column_priv (column privileges) for the table and then they can only update the columns you allow them to do. I've never done that at the column level.
Here (http://www.devshed.com/c/a/MySQL/The-MySQL-Grant-Tables/) is an article that might help you understand how to do that at the column level.
08-10-2006, 05:08 PM
The people will be viewing it through an online form that they can access, but I don't want someone to update fileds that someone else has filled in, but I need them to be able to review them. They will have an opportunity to complete other fields, which obviously would need to be updated.
08-10-2006, 07:01 PM
Just echo the value from the database then. Don't give them a text box to update it.
08-10-2006, 07:04 PM
I have used UPDATE table set fields to update WHERE Row to only allow certain fields to be updated.... I hope this will work
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.