Custom query_posts() parameter

If you have your data in separate table adding support for it in query is somewhat messy. Basically you will need to filter posts_where and posts_join to modify raw SQL query so that your custom table is joined and checked against your custom values.

As per [faster :)] anu’s suggestion it would make sense to store values in Custom Fields and use Custom Field Parameters (related to Orderby, but not same thing) in query.