我已經添加了一個新的列到我的表已經有的屬性(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