This topic is locked

Master Table Field Value based on child Records Value

3/20/2015 5:07:51 AM
PHPRunner General questions
R
rob_by68 author

Hi to everybody,
I have an Order Table with an OrderDetails Table displayng child records.
In the master Order Table i have a field called "Status", while in details

Records, for each product, i have a field called "Availability".
What i'd want to accomplish is that if ALL child records of related products for a specific order

have "Availability" set to "Available", "Status" field in Master Table should

display "Closed", while if any other condition on child Records is met (i.e.

"Availability" set to "Not Available" or some child records are set to "Not Available"

and some others set to "Available"), the corresponding Master Order "Status" should

be set to "Opened".
Thanks in advance for any suggestions.
Roberto