I've added a new column to an existing custom extension table via phpMyAdmin.
I then added the below to the form block and that's working fine:
$fieldset->addField('exchange_rate_deposit', 'text', array( 'label' => 'Exchange Rate (Deposit)', 'name' => 'exchange_rate_deposit', ));
And was able to get the field to save to the db via:
$data = $this->getRequest()->getPost(); $model= Mage::getModel('custom/module')->load($data['id']); $model->addData(array('exchange_rate_deposit' => $data['exchange_rate_deposit'])->save());
So after doing that I needed to add a few more columns to the table, so I just duplicated the process, changing the field names etc (I added the columns to the table last) however I cannot get the other fields to save to the database and have no idea why!
Never done this before so not sure exactly what steps you're supposed to take, but it's as if the ORM mappings haven't been setup for the other attributes and it's just ignoring them, and unfortunately I don't really know how I got the original attribute saving to the db. I've cleared the cache to see if that works but to no avail.