On 5/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
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 });


Well, off of the main topic, you should really use $storage->dbh
rather than $storage->_dbh, or you're not protected from disconnected
dbh's.

-- Brandon

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to