Page 1 of 1

Search in multiple tables

Posted: Mon Feb 16, 2015 8:42 pm
by silvana

Dears,

as a example we have have 2 tables,

--- orders
--- order_id
--- customer_id
--- employee_id
--- etc

--- order_details
--- orderdetails_id
--- order_id
--- unit_price
--- extended_price

now if i need to search between two tables, what can i do ?
i mean the important parameter to search are customer_id and extended_price, how can i search for both parameters between two table in phpmaker.


Re: Search in multiple tables

Posted: Tue Feb 17, 2015 10:39 am
by mobhar

You may create a Database View that joins those two tables, and use it to generate the List page that contains the Search feature.


Re: Search in multiple tables

Posted: Wed Feb 18, 2015 8:47 pm
by silvana

if i did not use view, is it possible to change search parameters in parent table to search some field in child ?


Re: Search in multiple tables

Posted: Thu Feb 19, 2015 9:39 am
by mobhar

You can only search the field in detail table from the master record section, as long as the field exists in the master table.