I'm trying (unsuccessfully) to get DBI:Pg to insert NULL values into 
a table. The following works in psql (and dbish):

'UPDATE null_test SET dwarf_1=NULL WHERE dwarf_2='Grumpy';'

It also works in a $dbh->do() statement:

But when I attempt the same with placeholders:

$cursor = $dbh->prepare( qq{UPDATE null_test SET dwarf_1=? WHERE 
dwarf_2=?} )  || die $dbh->errstr;
$cursor->execute(NULL, 'Grumpy') || die $dbh->errstr;

Perl complains about the bareword, NULL. Turning off strict results 
in the string 'NULL' being inserted.

I'm stuck. Please help.
-- 
My brain hurts!
SeanC
                      Mediatek Training Institute
            26 Crart Ave., Berea, Durban, South Africa 
<-- New Address
    phone: +27 (0)31 202 1886              [EMAIL PROTECTED] <-- 
New Phone Number
       fax: +27 (0)31 202 1767 
<-- New Fax Number
                   <http://members.nbci.com/s_carte/>

Reply via email to