This topic is locked
[SOLVED]

 selective records in tabes?

7/30/2008 8:22:46 AM
PHPRunner General questions
D
Default author

Hi,

I want to display different recordset for different users. Suppose a table that holds students data and depending on user group you want to display only those faculty students, that user is authorised to work with. I am considering 2 ways to do so:

  1. create custom view for each faculty and manually adjust users to those views. But this is very looong way.
  2. I have an idea, I am not sure would it work or not. Suppose in user table I have not only username-password-user_group but also additional field - for example: faculty_id. And in students table querry I add one line

    SELECT{

    ........

    }FROM students

    WHERE faculty=user's faculty ID (please advice how I can get this - namely how I can get current username - all the rest I will do myself)

    Is such way possible? would it work?

J
Jane 7/30/2008

Hi,
use User can see and edit their own records only security method on the Advanced security settings dialog on the Security tab for this purpose.

Select faculty and faculty_id as OwnerID fields.

D
Default author 7/30/2008

Jane

thank you very much. That is why it is necessary to read what's new <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=31569&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />.

Thank you again.