Thanks for the responses, but this isn't what I'm looking for. I'm looking for a way to make a field or record unchangeable for ANYONE, including the system administrator. That way, I can have a fairly high level of assurance that the record is valid and hasn't been tweaked in any way.


Anyway to do this within the database itself?   Thanks!!

Jigal van Hemert wrote:

I was wondering if there was some builtin mechanism I could use to
ensure that a field or row in my database could not be altered after it
was initially inserted. Is there anything in the database that would
allow this type of functionality? Thanks!!



You can give a user certain rights to do things with certain databases or tables. You cannot set the rights for a limited number of rows however. Take a look at http://dev.mysql.com/doc/mysql/en/GRANT.html

If you do not GRANT (or if you REVOKE) the rights for this particular user
to DELETE or UPDATE the table he/she can only insert new data and select
things (and all other things he/she has the rights for). It's good practise
to only grant the rights to a user he/she needs to do.
For use with (web) applications it's also better to create a new user for
that purpose and grant the necessary right.

Regards, Jigal.




Reply via email to