내 테이블에 새 열을 추가했습니다. 이미 (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);
}
저를 제안하십시오 ..
예 이제/cache/Models 폴더의 파일을 제거했습니다. 감사합니다. – useranon
고맙습니다. 벽에 맞서이 벽에 대해 머리를 때리고있었습니다. –
cakephp 2.4.3 @ dohofstet에서이 작업을 수행 할 수있는 곳은 어디입니까? – Leah