That looks quite a neat solution. Thanks.
One possible problem I can see, though, is that I was hoping to use this query as a view, which would greatly simplify the main query, but I was reading on the MySql help site that views don't allow sub-queries in the From clause.
Is there a way that I could encapsulate this query, so I could call it from the From clause of the main query, which would do the range comparisons of the degree columns with the input parameters, hence a table would need to be returned, rather than a variable from a procedure?
- your quick and easy, yet powerful solution for managing your membership site sales, downloads and affiliates.