Very cool r937!
I'm following you, but I created two unintended consequences in my OP.
I didn't state in my OP that I also need the unmatched records from the table called plan. Turns out that deleting the second LEFT JOIN resolved that issue. I also changed "MIN(curwipprice_online) AS lowest" to "MIN(curwipprice_online) AS curwipprice_online" in an attempt to match the output format in the OP. Here's the current query:
LEFT OUTER JOIN
cliorder, MIN(curwipprice_online) AS curwipprice_online
addr = '$addr_clear'
) AS x
x.cliorder = plan.cliorder
The other unintended consequence is that I need each row to produce an array that ends with these keys (see my OP):
=> string(4) "0.47" ["curwipprice_online"]=> string(4) "0.47"
=> string(14) "1840 Pawnee St" ["addr"]=> string(14) "1840 Pawnee St"
The current query selects rows that produce an array that ends with:
=> NULL ["curwipprice_online"]=> NULL }
I don't think the order matters as much as that missing key.
How do I get the ["addr"] key from the table called trkg, into the selection results? I tried adding ", addr" in the second select, but nogo.