Whoops, lied.  Wicked brackets were masquerading as parens....  Added file with db interactions, sql-to-implement, and logic.