This topic is locked
[SOLVED]

 Multiple Key Master-Detail Query

9/28/2013 4:22:04 AM
PHPRunner General questions
J
JER author

I'm struggling with Multiple key Master-detail......
I have a master table with one key and another match column (based upon family membership..for interest) and another table with the same two keys.
Question: It is not clear from everything I've read if your implementation of multiple keys is AND or OR logic?
I need OR logic although not of course to produce duplicate records (or record counts) where both key columns match.
Question: Is the underlying Master-Detail SQL query visible anywhere or maybe even editable?
Currently when I do use a two column relationship the indicated record count on the list page does not correctly reflect the records found either on the hover report or the edit form. I have a feeling that the number is being generated only on the first key.
Thanks

Sergey Kornilov admin 9/28/2013

Master-Details relationship with composite key use AND condition in SQL query by definition. If you need to use OR condition - you can implement your own solution.
Set 'View as' type of one of fields to 'Custom' and make it a hyperlink that points to the details table. URL should look similar to this one:

Cars_list.php?q=(Make~equals~Audi)(Model~equals~TT)&criteria=or
More info:

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

J
JER author 10/7/2013



Master-Details relationship with composite key use AND condition in SQL query by definition. If you need to use OR condition - you can implement your own solution.
Set 'View as' type of one of fields to 'Custom' and make it a hyperlink that points to the details table. URL should look similar to this one:

Cars_list.php?q=(Make~equals~Audi)(Model~equals~TT)&criteria=or
More info:

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


That worked!

Thank you Sergey