| Index
» Projekty
» phpMyEdit
» Fórum
» edit table by 2 people with different rights |
 |
traktor
Založený: 25.10.2004
Príspevky: 2
Zaslal: 2005-01-07 11:21
Návrat hore
Odpovedať s citátom
|
I have a table:
ID
contact_name
contact_addr
I would like to add my contacts to this and also my college want to add his contact - to have a complete database.
But I don't want my collage to be able to edit/del my contacts - is it possible somehow?
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2005-01-07 11:26
Návrat hore
Odpovedať s citátom
|
easiest way is to check in your 'trigger update/delete before' whether that record belongs to that user and return false if not (the change/delete query will not be executed).
you will see 'change' button on all records, but you will be able to change only yours.
|
traktor
Založený: 25.10.2004
Príspevky: 2
Zaslal: 2005-01-07 11:33
Návrat hore
Odpovedať s citátom
|
should I set up 2 mysql users? is that all?
|
michal
Založený: 17.06.2003
Príspevky: 537
Bydlisko: Slovakia
Zaslal: 2005-01-07 13:02
Návrat hore
Odpovedať s citátom
|
no, one sql user is enough.
but you need some kind of login screen for private zone. search for something like 'php login library' or build your own.
from phpMyEdit-s point of view, all you have to know which user is logged in. and change you sql tables adding column like 'owned_by_user'.
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|