Ich habe eine neue Spalte zu meiner Tabelle Attribute hinzugefügt, die bereits hat (ID, Form_id (Fremdschlüssel), Typ, Label, Größe, Sequenz Nr, Instr) wo Instr ist die neue Spalte, die ich hinzugefügt habe.Warum wird in den Abfrageergebnissen in CakePHP keine neue Tabellenspalte angezeigt?
Meine Anwendung ist in CakePHP und MySQL.
Ich habe den folgenden Code verwendet, um in die Tabelle Attribute einzufügen, aber das Feld instr wird nicht eingefügt.
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);
}
Bitte machen Sie mir ..
Ya Jetzt habe ich die Dateien in/cache/Models Ordner jetzt ist es getan. Vielen Dank. – useranon
Vielen Dank, ich schlug meinen Kopf gegen die Wand über diese –
wo können wir das auf CakePHP tun 2.4.3 @dhofstet? – Leah