Is there a way to query different databases based on the value of a column in the query?
Say for example you have the following columns:
- id
- part_id
- attr_id
- attr_value_ext
- attr_value_int
You then run a query and if the attr_id is '1' is returns the attr_value_int column but if attr_id is greater than '1' it joins data from another table based on the attr_value_ext.