How I deal with this. I extend all my models with MyApp_Db_Table (this is
somewhere in my library directory). MyApp_Db_Table is extended by
Zend_Db_Table_Abstract.
With $this->_getCols(); I get all the columns in my table. If I have values
posted that are not in the table columns I remove them before inserted. You
only have to declare this ones and extend all your models with this class.
I hope this helped...
class MyApp_Db_Table extends Zend_Db_Table_Abstract
{
function __construct()
{
parent::__construct();
}
public function insert($data)
{
$vars = $this->_getCols();
$keys = array_keys($data);
foreach($keys as $key)
{
if(!in_array($key, $vars))
unset($data[$key]);
}
return parent::insert($data);
}
}
-----
visit my website at http://www.phpscriptor.com/ http://www.phpscriptor.com/
--
View this message in context:
http://www.nabble.com/Zend_Form-submit-not-to-have-a-name-tp22041464p22042501.html
Sent from the Zend Framework mailing list archive at Nabble.com.