MySQL Forums
Forum List  »  MySQL Query Browser

Query Problem
Posted by: wryfhk22 jiji
Date: March 29, 2011 09:33PM

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?

Thanks in advance

Options: ReplyQuote


Subject
Written By
Posted
Query Problem
March 29, 2011 09:33PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.