Hi All, I have this query and im not sure why it is not working. Im hoping someone can help me out. Query: SELECT DISTINCT rate, lcdial_providers.dialstr,'0', lcdial_providers.id, lcdial_providers.provider FROM lcdial_rates LEFT JOIN lcdial_providers ON lcdial_providers.provider=lcdial_rates.provider LEFT JOIN lcdial_prefix_control ON lcdial_prefix_control.active=lcdial_rates.active WHERE lcdial_providers.enabled = 1 AND prefix='44' AND lcdial_prefix_control.active='1' ORDER BY length(prefix) DESC, lcdial_rates.rate ASC; Result: result: ERROR 1054 (42S22): Unknown column 'lcdial_rates.active' in 'on clause' Table Structure for lcdial_rates: prefix provider rate note id network enabled Table Structure for lcdial_prefix_control: prefix_control provider rate_control note id network active Table Structure for lcdial_providers: id provider dialstr enabled network Any ideas?
What do you think this is trying to tell you? result: ERROR 1054 (42S22): Unknown column 'lcdial_rates.active' in 'on clause' Its pretty straight forward. You do not have a field called 'active' in your lcdial_rates table.