Hi Adam, >From the documentation:
http://framework.zend.com/manual/en/zend.db.html If the name of your sequence object does not follow this naming convention, use the lastSequenceId() method instead. This method takes a single string argument, naming the sequence literally. Example 10.20. Using lastSequenceId() <?php $db->insert('bugs', $data); // return the last value generated by sequence 'bugs_id_gen'. $id = $db->lastSequenceId('bugs_id_gen'); Hope this helps! Best regards, Darby Adam Markiewicz wrote: > I'm developing a website which uses PostgreSQL as database server. When > I tried to insert a new record I got this: > > *Fatal error*: Uncaught exception 'Zend_Db_Statement_Exception' with > message 'SQLSTATE[42P01]: Undefined table: 7 ERROR: relation > "sections_id_seq" does not exist'. > > I found that Zend_Db_Table is made to use sequence name as > 'tableName_primaryKey_seq'. And this is not always valid as it's > possible (as I did) to name sequences differently. > > Is this deliberate? > > Adam
