List:General Discussion« Previous MessageNext Message »
From:Richard Whitney Date:March 3 2009 5:44pm
Subject:column exists but unknown
View as plain text  
Hello.

I am running MySQL 5.0.45
and have the following query and error:

SQL query:

SELECT SQL_CALC_FOUND_ROWS CONCAT( 'Edit Space' ) AS '', CONCAT( 'Edit
Status' ) AS '', space_id AS 'Space ID',
TYPE AS 'Ad Type', scheme AS 'Scheme', adman_ad_spaces.status_approved
AS 'Approval Status', adman_ad_spaces.status_paid AS 'Paid Status',
adman_ad_spaces.notes AS 'Notes', start_date AS 'Start Date', end_date
AS 'End Date*', adman_ad_spaces.inserted_on AS 'Created'
FROM adman_ad_spaces, adman_pricing_schemes
INNER JOIN adman_campaigns ON adman_campaigns.campaign_id =
adman_ad_spaces.campaign_id
INNER JOIN adman_users ON adman_users.user_id = adman_campaigns.user_id
WHERE adman_ad_spaces.status = 'Active'
AND adman_ad_spaces.scheme_id = adman_pricing_schemes.scheme_id
AND adman_ad_spaces.status_admin = 'Active'
AND adman_users.name LIKE '%dadasd%'
LIMIT 0 , 10

MySQL said:

#1054 - Unknown column 'adman_ad_spaces.campaign_id' in 'on clause'

part of the structure of adman_ad_spaces:


Field Type Collation Attributes Null Default Extra Action
space_id int(10)   UNSIGNED No  auto_increment
scheme_id int(10)  UNSIGNED No 0
campaign_id int(10)  UNSIGNED No 0
type enum('Text', 'Banner', 'Rich', 'Text in List') latin1_swedish_ci  No Text

as you can see campaign_id clearly exists in the table

Is my table corrupt?
Any ideas?

Thank you for your help.

Richard

--
Richard Whitney
phpMyDEV@stripped
http://phpmydev.com
Ofc. 602-288-5340
Ofc. 877-624-6302
Fax. 480-704-4559

"You come up with the ideas, I come up with the solutions."
Thread
column exists but unknownRichard Whitney3 Mar
  • Re: column exists but unknownRichard Whitney3 Mar