我已经添加了一个新的列到我的表已经有的属性(id,form_id(外键),类型,标签,大小,序列号,instr) 其中instr是我添加的新列。为什么CakePHP的查询结果中没有显示新的表列?
我的应用程序在CakePHP和MySQL中。
我已经使用下面的代码插入到表中的属性但是instr单独没有插入。
function saveFieldname($data)//from untitledfieldname
{
$this->data['Attribute']['form_id'] = $this->find( 'all', array(
'fields' => array('Form.id'),
'order' => 'Form.id DESC'
));
$this->data['Attribute']['form_id'] = $this->data['Attribute']['form_id'][0]['Form']['id'];
$this->data['Attribute']['label'] = 'Label';
$this->data['Attribute']['size'] ='50';
$this->data['Attribute']['instr'] ='Fill';
$this->data['Attribute']['type'] = $data['Attribute']['type'];
$this->data['Attribute']['sequence_no'] = $data['Attribute']['sequence_no'];
$this->Attribute->save($this->data);
}
请建议我..
Ya现在我已经删除了/ cache/Models文件夹中的文件,现在完成了。 谢谢你。 – useranon 2009-06-16 09:36:29
非常感谢,我在这张 – 2009-08-24 11:41:42