On Thursday 27 June 2002 02:30 pm, Mike(mickalo)Blezien wrote:
> Walt,
>
> Use Perl's 'undef' for NULL values.
>
> $quoted_some_variable = undef;
>
> now the $quoted_some_variable will be a null value.
>
> >>On Thu, 27 Jun 2002 12:50:55 -0400, walt <[EMAIL PROTECTED]>   wrote:
> >>
> >>I'm in the process of re-writing 100+ perl CGIs written for oracle to
> >> mysql.
> >>
> >>Does anyone know how to get the dbh->quote(some_value) function in perl
> >> to return the string "NULL" if some_value is empty. Currently its
> >> returning '' (2 ticks) and when you update a numeric column, it sets the
> >> value to 0 "zero".
<snip>

Thanks for you reply Mike!
This almost gets me where I want, but I'd still have to run a check to see if 
the value for the variable is null and that is what I'm trying to get away 
from. There are about 10 editable text fields in one the CGIs and many of 
those may be blank (user deleted the value)  in which case I'd need to update 
that column in the db to NULL. Any other ideas would be appreciated!

Thanks!
-- 
Walter Anthony
System Administrator
National Electronic Attachment
Atlanta, Georgia 
1-800-782-5150 ext. 1608
 "If it's not broke....tweak it"




---------------------------------------------------------------------
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