YII with postgres: getting the next sequence value

That is a question: how can I get the next sequence value with YII?

Have you try that ?

You will have to use the sequencename with postgres, CDbConnection::getLastInsertID($table->sequenceName), or use CDbCommandBuilder->getLastInsertID(‘tablename’).

It might be necessary (if you want to stay database independend) to first get the table schema and then the sequence name, if using DAO.

Oh, thanks a lot guys!