This topic is locked

How to detect if view is a DETAIL view?

4/16/2007 9:15:58 AM
PHPRunner General questions
D
dani author

Hello
I have two views to the same table: one as detail on a master-detail setup (where I only see the detail records associated to a master record in the other table) and one by itself, where I can see all the records. Both use the same url (with different parameters) for display.
I'd like to allow a procedure when looking at that table only if it is in a master-detail situation.
What would be the way to detect that? Was thinking of looking at $mastertable and $masterkey variables as a first test.
Thanks
Dani

Alexey admin 4/16/2007

Dani,
to detect is master -detail filter is on you need to check whenever this variable:

$_SESSION[$strTableName."_mastertable"]

is empty or not.