Re: Using Perl DBI quote() method with NULL values?

2003-01-08 Thread Salam Baker Shanawa
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

Re: Using Perl DBI quote() method with NULL values?

2003-01-07 Thread Rodney Broom
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

Re: Re: Using Perl DBI quote() method with NULL values?

2003-01-07 Thread Paul DuBois
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

Re: Using Perl DBI quote() method with NULL values?

2003-01-07 Thread Keith C. Ivey
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

Re: Using Perl DBI quote() method with NULL values?

2003-01-07 Thread walt
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

Re: Using Perl DBI quote() method with NULL values?

2003-01-07 Thread Paul DuBois
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