当我查看请愿控制器的索引页面时,我遇到了以下错误。这已经被烘焙了......我不确定这意味着什么,虽然我怀疑这与表名在SQL中不是复数有关,因为表名是Petitions,坚持蛋糕的命名惯例......任何想法家伙?< / p>
SELECT `Petition`.`random_string`, `Petition`.`diary_number`, `Petition`.`group`, `Petition`.`created`, `Petition`.`modified`, `Petition`.`petitioner_type`, `Petition`.`signed`, `Petition`.`project_desc`, `Petition`.`amount_suggested`, `Petition`.`amount_accepted`, `Petition`.`project_type`, `Petition`.`project_decision`, `Petition`.`evaluation`, `Petition`.`admin_comments`, `Petition`.`commentator_comments`, `Petition`.`q1_petitioner`, `Petition`.`q1_partners`, `Petition`.`q1_regcode`, `Petition`.`q1_responsible`, `Petition`.`q1_position`, `Petition`.`q1_address`, `Petition`.`q1_zipcode`, `Petition`.`q1_city`, `Petition`.`q1_phone`, `Petition`.`q1_gsm`, `Petition`.`q1_email`, `Petition`.`q2_project_name`, `Petition`.`q2_target_group`, `Petition`.`q2_project_goal`, `Petition`.`q2_newones`, `Petition`.`q2_newgroups`, `Petition`.`q2_organizers`, `Petition`.`q2_donations`, `Petition`.`q2_type`, `Petition`.`q3_amount`, `Petition`.`q3_purpose`, `Petition`.`q3_account_number`, `Petition`.`q3_receiver`, `Petition`.`q4_sports`, `Petition`.`q4_participates`, `Petition`.`q4_places`, `Petition`.`q4_schedule`, `Petition`.`q4_marketing`, `Petition`.`q4_directors`, `Petition`.`q4_monitoring`, `Petition`.`q4_support`, `Petition`.`q4_collaboration`, `Petition`.`q5_costs`, `Petition`.`q5_costs_desc`, `Petition`.`q5_income`, `Petition`.`q5_income_desc`, `Petition`.`q5_invisible`, `Petition`.`s1_question1`, `Petition`.`s1_question2`, `Petition`.`s1_question3`, `Petition`.`s1_question4`, `Petition`.`s1_question5`, s1_question., `Petition`.`s2_question1`, `Petition`.`s2_question2`, `Petition`.`s2_question_3`, `Petition`.`s3_question1`, s3_question2., `Petition`.`s4_question1`, `Petition`.`s4_question2`, `Petition`.`s5_question1`, s5_question2. FROM `petitions` AS `Petition` WHERE 1 = 1 LIMIT 20 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' `Petition`.`s2_question1`, `Petition`.`s2_question2`, `Petition`.`s2_question_3' at line 1 0
答案 0 :(得分:0)
嗯,是的,如果表名是Petitions,那么尝试从名为Petition的表中选择值的SQL代码将不起作用。我对Cakephp约定的理解是它希望所有的表都是小写的,所以这可能会抛弃它的变形器?见:http://book.cakephp.org/view/1478/Inflector。