Hi,
Using DBI 1.30 on FreeBSD 4.6 with mySQL 4.04, DBD::mysql 2.0416, and Perl 5.06
Is it possible to insert a NULL with query like this?
$insert = qq!
INSERT INTO blah a,b,c VALUES (?,?,?)
!;
$insert_hnd = $dbh->prepare($insert_orders);
$insert_hnd->execute($var1,$var2,$var3);
Ok, so I have three vars to place in my execute statement, how can I make
one of them at least potentially insert a NULL?
Or is there no way to do this with this form?
I am trying to keep some logic out of a query module, but I can't get this
to work. Most of the time $var3 will have data. Some of the time it needs
to be left NULL. Setting $var3 = 'NULL' or '"" doesn't work. What if I
undef ed $var3?
Thanks,
Eric
- Re: DBD::Pg timings Tim Bunce
- Re: DBD::Pg timings jmelesky
- Re: DBD::Pg timings Paul Boutros
- Re: DBD::Pg timings Jason E. Stewart
- RE: DBD::Pg timings David Duff
- Re: DBD::Pg timings Jason E. Stewart
- Re: DBD::Pg timings Tim Bunce
- Re: DBI insert a NULL with a pr... Eric
- Re: DBI insert a NULL with ... Paul Boutros
- Re: DBI insert a NULL with ... Michael A Chase
- Re: DBD::Pg timings Jason E. Stewart
