I have a search query thats throwing a 1054: Unknown column ' Program.id' in
'on clause'

This is the query :

SELECT DISTINCT (`Job`.`id`) 

as id FROM `jobs` AS `Job` inner JOIN

 jobs_programs AS `JobsProgram` ON 

(`JobsProgram`.`job_id` = `Job`.`id`)
 
inner JOIN programs AS `Program` ON 

(`Program`.`id` = `JobsProgram`.`program_id` 

AND ` Program`.`id` IN ('1', '31')) inner JOIN 

jobs_languages AS `JobsLanguage` ON 

(`JobsLanguage`.`job_id` = `Job`.`id`) inner JOIN 

languages AS `Language` ON (`Language`.`id` = `JobsLanguage`.`language_id`
AND 

`Language`.`id` = ('13')) WHERE 1 = 1

The HABTM tables are standard

programs:
Id
Name

languages:
Id
Name

jobs_languages
id
job_id
language_id

Jobs_programs
id
job_id
program_id

Anyone see where the error could be?

 
Dave Maharaj
Freelance Designer
[email protected]
www.widepixels.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to