This topic is locked
[SOLVED]

 parent table sharing

6/19/2012 6:10:36 PM
PHPRunner General questions
R
rstackhouse author

I have "teacher" that has many "student" records and I would like to let the teacher create a teacher-v-teacher table that allows a report that compares the students under them
So a table named teacher_v_teacher that has:

teacherID1

teacherID2

(etc)
I would like to let a teacher create a record and allow the other teacher to "approve" the connection.
The security section only allows ID1 or ID2 for "Advanced security setting"
I suppose one solution is to have "teacherMaster" and "teacherSlave" instead of ID1 and ID2 and duplicate the record...
As you can see my logic says "the table is equal" but ownership is two items not one.. I think a master/slave emans 2x the records but I guess that's ok.
Am I missing a more logical method that works well?
Thanks

J
Jane 6/20/2012

Hi,
you can use List page: Before SQL query event on the Eventstab to add custom WHERE statement. Here is just a sample:

$strWhereClause = whereAdd($strWhereClause,"teacherID1=".$_SESSION["TeacherID"]." or teacherID2=".$_SESSION["TeacherID"]);



where $_SESSION["TeacherID"] contains ID of logged in teacher. You can save it in the After successful login event for example:

http://xlinesoft.com/phprunner/docs/save_user_data_in_session_variables.htm

R
rstackhouse author 6/28/2012

thanks, I'm not sure if that will work for my question.. (maybe the question is wrong..)
I have most of my tables security set up so that only "your own" records can be editied.. So what I was seeing is that the only records the wizard were able to see where "mine" vs providing "others"--
I created a VIEW of the tables I needed called tableOPEN which was open (where table was not) and used the tableOPEN table instead...