Hi Jeff,
Try the magic undef as it is with no '' or ""
$dbh->do('insert into yourtab values (' .
join (',', map($dbh->quote($_), $your_stuff, undef, $more_stuff)) .
')') ;
Regards
Salam
Jeff Snoxell wrote:
Hello,
I've got a mysql table with a lot of fields and I'm using a map
From: Jeff Snoxell <[EMAIL PROTECTED]>
> ...I'm using a map statement...
> ...through the quote system...
Short answer: Don't do that.
The longer answer:
# Prepare the SQL using 'bind' operators.
$sth = $MyDatabase->prepare(qq{
INSERT INTO MyTable
(col1, col2, col3)
VALUES
Date: Wed, 8 Jan 2003 01:56:39 +0100
From: [EMAIL PROTECTED]
To: Paul DuBois <[EMAIL PROTECTED]>
Subject: Re: Re: Using Perl DBI quote() method with NULL values?
At 17:16 -0500 1/7/03, walt wrote:
Jeff,
I'm not sure if this will help or not, but we ended up adding our
own version
On 7 Jan 2003, at 18:32, Jeff Snoxell wrote:
> Which works fine except the "\N" isn't entered into my database as a null
> value. I've also tried '\N' and '' and "".
Null values are represented as undef in DBI.
[Filter fodder: SQL]
--
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
Jeff Snoxell wrote:
> Hello,
>
> I've got a mysql table with a lot of fields and I'm using a map statement
> to pass each of my values for a new record through the quote system so-as
> to have everything nicely wrapped up. Problem is that I can't find any way
> of writing a null value to my DB whe
At 18:32 + 1/7/03, Jeff Snoxell wrote:
Hello,
I've got a mysql table with a lot of fields and I'm using a map
statement to pass each of my values for a new record through the
quote system so-as to have everything nicely wrapped up. Problem is
that I can't find any way of writing a null val