[Dbix-class] Access a Sequence - Best practice

SHAD0WRUNNER at gmx.de SHAD0WRUNNER at gmx.de
Tue May 15 15:25:36 GMT 2007


Hello,

I want to update many Rows with the same sequence-number.
My solution is :

$sql = "SELECT my_seq.nextval FROM DUAL";   
($id)  = $storage->_dbh->selectrow_array($sql);

$resultset->update({ 'nr' => \'my_seq.currval'});

or

$resultset->update({ 'nr' => $id });

Can I do it better?

Regards
Dieter

-- 
FastJack

Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger



More information about the Dbix-class mailing list