Hi
I have just started working on a project and I am using zend framework and postgresql (normally use MySQL) however I am hitting a problem when I am trying to get the last inserted id when using the Zend_Db insert command.
When using the function $db->lastinsertid('users', 'userid');
I get the following error message:
SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "users_userid_seq" does not exist LINE 1: SELECT CURRVAL('users_userid_seq') ^
I've checked the database and the sequence does exist, and both the table and the sequence is owned by the the same user that is being use to access the application.
I've even tried $db->lastSequenceId('users_userid_seq');
but still get the same error message.
I am not sure if the problem is with postgresql (I think most likely) or with the framework.
Has anyone else had a similar problem to this?