Re: using mysql NULL with IF statement

2008-07-14 Thread Huub
if (! defined($myvar)) { The NULL in the database is mapped to an undef. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery Thank yo

RE: using mysql NULL with IF statement

2008-07-13 Thread Thomas Bätzler
Huub <[EMAIL PROTECTED]> asked: > I'm adapting a Perl script using MySQL connectivity, and have > to compare a variable, e.g. $myvar, with the value NULL from > the database. In MySQL, I have to use the query 'where myvar > is null', which works great. > But when I try this in Perl, like 'if ($

Re: using mysql NULL with IF statement

2008-07-13 Thread Jenda Krynicky
From: Huub <[EMAIL PROTECTED]> > I'm adapting a Perl script using MySQL connectivity, and have to compare > a variable, e.g. $myvar, with the value NULL from the database. In > MySQL, I have to use the query 'where myvar is null', which works great. > But when I try this in Perl, like 'if ($myva