Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Handling Null or Undef values in DBI (and things of those nature)...

by gav^ (Curate)
on Jan 08, 2002 at 09:05 UTC ( #137050=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my ($field1, $field2, $field3) = (undef, undef, undef);
    my $sth = $dbh->prepare('select * from table');
    ...
    }
    $sth->finish;
    for ($field1, $field2, $field3) { $_ ||= '' }
    
  2. or download this
        $dbh->do('insert into blah (?, ?, ?)', undef, $x, $y, $z);
        if ($dbh->err) {
    ...
                # some other problem
            }
        }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://137050]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2022-08-16 19:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?