batonac
Member
I have two tables that are joined together. One is called 'city' and the other 'standards_body'. The standards_body table has a databasejoin field called called 'city_id' that references the 'city'.'id' field through a databasejoin element. All configures properly until I go to access the list data, where I get this error:
The problem is that 'city' doesn't have a column 'city_id', just 'id'. Only the referencing column 'standards_body'.'city_id' has that name...
Code:
Unknown column 'city.city_id' in 'field list' SQL=SELECT SQL_CALC_FOUND_ROWS DISTINCT `standards_body`.`id` AS `standards_body___id`,
`standards_body`.`id` AS `standards_body___id_raw`,
`standards_body`.`name` AS `standards_body___name`,
`standards_body`.`name` AS `standards_body___name_raw`,
`standards_body`.`code` AS `standards_body___code`,
`standards_body`.`code` AS `standards_body___code_raw`,
`standards_body`.`standard_title` AS `standards_body___standard_title`,
`standards_body`.`standard_title` AS `standards_body___standard_title_raw`,
`standards_body`.`city_id` AS `standards_body___city_id_raw`,
`city`.`city_id` AS `standards_body___city_id`,
`standards_body`.`state_id` AS `standards_body___state_id_raw`,
`state`.`state_id` AS `standards_body___state_id`,
`standards_body`.`country_id` AS `standards_body___country_id_raw`,
`country`.`country_id` AS `standards_body___country_id`,
`standards_body`.`id` AS slug
, `standards_body`.`id` AS `__pk_val`
FROM `standards_body`
LEFT JOIN `city` AS `city` ON `city`.`id` = `standards_body`.`city_id`
LEFT JOIN `state` AS `state` ON `state`.`id` = `standards_body`.`state_id`
LEFT JOIN `country` AS `country` ON `country`.`id` = `standards_body`.`country_id` LIMIT 0, 10