At 18:32 +0000 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 value to my DB when the value has first passed through quote().

I've tried:

my $err = $MyDatabase->do('INSERT INTO MyTable VALUES(' .
join(",",map($MyDatabase->quote($_),
0, # REF
0, # PARENT REF
$FormData{'Title'} . " " . $FormData{'Name'} . "",
$FormData{'Email'} . "",
"\N", # <-- I REALLY WANT THIS TO BE A NULL VALUE!
Use undef to get a NULL value.

etc.,
etc.,
etc.....
)) .
')');

Which works fine except the "\N" isn't entered into my database as a null value. I've also tried '\N' and '' and "".

Any ideas how I can solve this easily?

Thanks,

Jeff


---------------------------------------------------------------------
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to