Zend Framework Database Insert Issue

dudikre1

New Member
I'm starting out using the Zend Framework and have created a suitable model which saves data back to a database table. The issue I am having is that the sql statement is trying to insert '?' as the value for each column in the database. I have created the following save function which passes an array of data to the DBtable adapter functions:\[code\]public function save() { $data = http://stackoverflow.com/questions/3888739/$this->getData(); if ($data['pageId']==0) { $this->getDbTable()->insert($data); } else { $this->getDbTable()->update($data, array('pageId = ?' => $data['pageId'])); }} \[/code\]This seems to go through the appropriate motions but the item is not added to the database and the sql statement within MySql logs looks something like:\[code\]insert into DB_Table ('pageId','title','body') values ('?', '?', '?');\[/code\]Not quite sure where this is falling down, any pointers would be gratefully received.Thanks
 
Back
Top