I have a table to store login data. It has UserID, Password, SeniorID.
Eg:
1234, secret, 5678
2222, secret2, null
5678, secret3, null
The data table would have UserID, data1, data2.
Eg:
1234, somedata, somedata
2222, somedata, somedata
5678, somedata, somedata
I would like to make the user 1234 login can only view his own data from data table. When user 5678 login, he will be able to view both 1234 data because he is his senior and his own data. Both of them, however, cannot edit their own data.
How can I do this?
Thanks.