This topic is locked

Search in details

2/13/2012 8:23:01 AM
PHPRunner General questions
W
wpl author

Hi all,
how would one achieve to search for data in a details table using simple or advanced search of the master table? Does one have to join the tables?
Thanks for any hints.

Sergey Kornilov admin 2/13/2012

To search across multiple table you will need to join them. This can be done on SQL Query screen in PHPRunner.

W
wpl author 2/13/2012

Sergey,
thanks for your answer. But what if master-detail is 1:n?

Sergey Kornilov admin 2/13/2012

Not sure I understand your question. Yes, Master-Details are usually 1:n though I don't see how is that related to your search question.

W
wpl author 2/13/2012



Not sure I understand your question. Yes, Master-Details are usually 1:n though I don't see how is that related to your search question.



Sergey,
my objection is that, if I have 10 details records, after the join I will have 10 entries for the master record in my list page - or am I totally wrong?

Sergey Kornilov admin 2/13/2012

You need to provide the big picture.
If you do not want to display details - how would you show the search results?

W
wpl author 2/13/2012

Sergey,
I will try to give an example for the big picture: let's say I have buildings with a different number of rooms each (master building, details rooms). Each room has an area (as one attribute). I would like to search from the buildings list page/advanced search page for all buildings with a room with an area of >= yy square meters or for other attributes of the detail table.