in reply to Re: Missing a bind variable, but where?
in thread Missing a bind variable, but where?

Passing in undefined values as bind values is perfectly OK. That's how you pass in NULL.

Abigail

  • Comment on Re: Missing a bind variable, but where?

Replies are listed 'Best First'.
Re: Re: Missing a bind variable, but where?
by tachyon (Chancellor) on Feb 27, 2003 at 17:39 UTC

    Not in this context it is not. In list context if one of the param values is undef CGI.pm will return an empty list, and thus we get a 7 not 8 member list passed and so the bind error:

    @ary = ( (), ('val'),('val'),('val'),('val'),('val'),('val'),('val') ) +; print scalar @ary; __DATA__ 7

    Thus as I suggested defining the values or setting undef ones to 'NULL' will work fine.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print