in reply to Re: Array values into a database help!
in thread Array values into a database help!

On this line:
$sth->execute((@fields, undef, undef, undef, undef)[0..3], $user);
If any of the 4 values are not true it will send a null/empty value to the database, or if some are true, it will send that value. else the rest will be null/empty, right? If its yes, thank you!!

Replies are listed 'Best First'.
Re^3: Array values into a database help!
by ikegami (Patriarch) on Nov 28, 2010 at 06:07 UTC
    Exactly, although I've added simpler alternatives to the list slice to my original post. The list slice approach is useful if you want a default of something other than undef (NULL).