This topic is locked

Phprunner 10.91 search master detail togheter

5/9/2023 6:33:22 AM
PHPRunner Tips and Tricks
S
simone65 author

Hi everybody, on PhpRunner 10.91 i'm trying to search detail data using https://xlinesoft.com/phprunner/docs/search_master_and_details_tables_together.htm
but with no luck. i user Oracle Db and the MASTER table has a primary key ORDER_ID (type number), the DETAILS has a primary key with ORDER_ID and DETAIL_ORDER_ID ( type number).
PROD is the dummy value on the master table and it's searchable
$srchObj = SearchClause::getSearchObject("MASTER");
$value = $srchObj->getFieldValue("PROD");
if( $value != null ) {
$srchObj->setSearchSQL("PROD", "ORDER_ID in (select ORDER_ID from DETAILS where product like '%$value%')");
}
trying to use search field usually on the top of the page, produce no result, if i try to echo $value after the statement $srchObj->getFieldValue("PROD") but no value is echoed.
Any help is appreciated
Regards Simone

fhumanes 5/14/2023

Hello,
I have created an article of topics on how you can solve the problem you have.
https://asprunner.com/forums/topic/29903-Guide-61--Advanced-search--Inclusion-of-detail-records
I hope it serves you and that it is clear how you should apply that I propose.
Greetings,
Fernando