[Dbix-class] Update with more bound variables

Ion Pop ionpop123 at gmail.com
Wed Mar 10 17:12:13 GMT 2010


Hello,

When I make an update for a field and I need to use more bind
variables, it gives an error.

I tried:

$rs->update({
  open => \["(open + ? * ?) / (1 + ? + ?)",
    [dummy1 => $var1, dummy2 => $var2, dummy3 => $var3, dummy4 => $var4]],
});

The error given is:

DBIx::Class::Schema::txn_do(): bindtype 'columns' selected, you need
to pass: [column_name => bind_value] at
e:/usr/site/lib/SQL/Abstract.pm line 1108.

It gives the same error if I just do:

  open => \["(open + ? * ?) / (1 + ? + ?)",
    $var1, $var2, $var3, $var4],

and the same error if I do:

  open => \["(open + ? * ?) / (1 + ? + ?)",
    [$var1, $var2, $var3, $var4]],

Please tell me which is the correct syntax if this is possible with DBIC.

Thanks.

IP



More information about the DBIx-Class mailing list