If you are using anything SQL::Abstract based like Mojo::mysql and you are using ->insert(... %hash) then you could do something like:
[...] $new_user{REMOVED} = &mysqlBitField($data->{REMOVED}); [...] sub mysqlBitField($field){ return undef unless defined($field); return pack("b", 0) if $field == 0; return pack("b", 1); }
Thank you mable for the pack b idea!!
In reply to Re: Handle MySQL BIT data type in Perl
by ait
in thread Handle MySQL BIT data type in Perl
by pg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |