My application has sales agents with different commission rates for park admission. This is represented by the following 2 MySQL tables, where the table names are bolded...
In the rates, each product is a string preceded by 1 and 2... So, possible products values are ABC1, ABC2, DEF1, DEF2, XYZ1, XYZ2
My question now is, how can I write a query, where I can supply the string of the product, Like 'ABC' and I would a single per agent row with the following columns:
Where, family1 is the family rate for ABC1, and adult2 is the adult rate for ABC2?