我正试图用以下的法典行文来过滤“谁”的“谁”具有某些(无关的)条件的所有员额。
c 美元=6美元;
然而,我不是仅仅在标的岗位上才有结果,而是在没有“谁”的帽子上,每个职位都有空档。
I know my question has come up before, but the solutions posted have not worked with my code. I have tried adapting the code here to my own: http://web-development-blog.co.uk/2010/09/14/cakephp-habtm-find-with-conditions-and-containable-behavior/, but I get an SQL error stating "Tag.post_id" not found in on clause.
请提供帮助。
试图从某些链接中执行守则的错误信息:
SELECT `Post`.`id`, `Post`.`title`, `Post`.`body`, `Post`.`created`, `Post`.`modified`, `Tag`.`id`, `Tag`.`tag`, `Tag`.`created`, `Tag`.`modified` FROM `posts` AS `Post` LEFT JOIN `tags` AS `Tag` ON (`Tag`.`post_id` = `Post`.`id`) WHERE `Tag`.`tag` = who 1054: Unknown column Tag.post_id in on clause
原因如下:
$this->Post->bindModel(array( hasOne => array( Tag )));
$this->Post->contain(array(
Tag
));
$com=$this->Post->find( all , array(
conditions =>array( Tag.tag => who )
));