IN A RENTAL PROPERTIES SITE I WANT TO GET AS A RESULT SET for each property sub-arrays
of prices, discounts, availability(when fully booked) (many periods each)
in other words something like properties[0][“prices”] = array prices - same other 2 (discounts, availability) but in each property appear only once[in a var_dump like is now THE SAME property appears many times and prices, discounts, availability are Not arrays ONE only entry per appearance of same property]… what have to use?
$sql = "SELECT p.*, d.*, a.* FROM properties as p
LEFT OUTER JOIN prices as c
ON c.Property_ID = p.Property_ID
LEFT OUTER JOIN discounts as d
ON d.Property_ID = p.Property_ID
LEFT OUTER JOIN availability as a
ON a.Property_ID = p.Property_ID
";