我一直在尋找一些答案,當我試圖訪問CakePHP的一個頁面,並且我仍然收到這個錯誤時發生的問題:錯誤:SQLSTATE [42S22]:未找到列:1054 CakePHP
錯誤:SQLSTATE [42S22]:未找到列:1054未知列'方坯。 USER_ID」在‘字段列表’
這裏是由蛋糕創建的查詢
SELECT `Billet`.`id` AS `Billet__id`,
`Billet`.`created` AS `Billet__created`,
`Billet`.`updated` AS `Billet__updated`,
`Billet. user_id` AS `Billet__ user_id`,
`Billet`.`title` AS `Billet__title`,
`Billet`.`tags` AS `Billet__tags`,
`Billet`.`content` AS `Billet__content`,
`Users`.`id` AS `Users__id`,
`Users`.`username` AS `Users__username`,
`Users`.`password` AS `Users__password`,
`Users`.`name` AS `Users__name`,
`Users`.`lastname` AS `Users__lastname`,
`Users`.`birthdate` AS `Users__birthdate`,
`Users`.`email` AS `Users__email` FROM `billet`
`Billet` INNER JOIN `users` `Users` ON `Users`.`id` = (`Billet. user_id`) LIMIT 20 OFFSET 0
,做查詢直接由蛋糕出爐,所以我沒有任何線顯示查詢如何的做了代碼。
請在CakePHP中顯示創建查詢的任何代碼... –
有些東西肯定會在此「Billet__ user_id」和「Billet」中添加一個空格。 user_id'。 –
正如我在下面所說的,代碼直接被Cake烘焙,所以我不認爲(在檢查後,我確信我沒有任何明確的查詢代碼),有任何代碼會干擾 – DevNewb