Thread: Deleting from a database
11-14-13, 07:37 #1Registered User
- Join Date
- Nov 2013
Unanswered: Deleting from a database
In my mysql database I have a users table which will hold user_ids and logins for all users in the database including staff and normal users.
In my system there with be 2 types of staff members, admin and staff, I plan on only allowing admin to access the users table. I have another table for normal users which consists of user_id as a foreign key and has candidate_id as a primary key. I want normal staff to be able to view this table and also be able to delete users from it.
Is it possible that staff will be able to delete users from this table without being able to access the users table? Will the records be deleted from the whole database?
I'm sorry if this is confusing, this is the first database I've built from scratch and I'm only in the design stage right now
I'm going to build the database using phpMyadmin and to start with will run on localhost as the database will be linked up to a website
Last edited by rach121; 11-14-13 at 09:16.
11-14-13, 08:21 #2Jaded Developer
Provided Answers: 59
- Join Date
- Nov 2004
- out on a limb
assuming you have rights to the database then you should be able to set user permissions as required. if the database is hosted on a third party server then you will need to ensure that the provider will let you set permissions approriately.
or you should be able to design your your schema so it can support the functionality you want. bear in mind applying permissions at the database level is preferable to doing the similar functions through codeI'd rather be riding on the Tiger 800 or the Norton