I didn't try it, but don't you need a "LEFT JOIN" in there somewhere to get the contents of h.cus and h.ta in case c.cus and c.ta don't exist?
in reply to Re: array of arrays calculations
in thread array of arrays calculations
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James