be careful
my @a = ( 'a', $c->req->param('a'), 'b', $c->req->param('b'), 'c', undef , 'd',, 'f' );$c->res->body(Dumper(\@a));when we try "?b=1", output:$VAR1 = [
'a',
'b',
'1',
'c',
undef,
'd',
'f'
];
see? $c->req->param('a') is NOT undef.
so when u try something like
$rs->update( {
column1 => $c->req->param('column1'),
column2 => $c->req->param('column2')
} ); then if column1 param is not specified, this would raise error because $rs try to update column1, column2, $c->req->param('column2'). we want 4 but u give me 3.so man, be careful of that. :)
Labels: DBIx-Class, Foorum
2 Comments:
你真垃圾,不告诉我代码是怎么加的tag,太不够意思了
diu, Post 那里不是有吗?
下面有个 Label
Post a Comment
Links to this post:
Create a Link
<< Home