Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hello
I have a database that makes - unfortunately - a bit of mix of undef and empty values. In the following script, I would like to match with $Tag1 and $Tag2 being "" (empty) if the corresponding values in the database is empty "" OR undef. Is this possible?
my $sql = 'SELECT * FROM GlossaryMetadata WHERE Tag1 LIKE ? AND Tag2 L +IKE ?'; $sth = $dbh->prepare($sql); $sth->execute($Tag1, $Tag2);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI match both empty and undef
by tobyink (Canon) on Jan 27, 2019 at 17:03 UTC | |
|
Re: DBI match both empty and undef
by pme (Monsignor) on Jan 27, 2019 at 15:21 UTC | |
by Anonymous Monk on Jan 27, 2019 at 16:05 UTC | |
by pme (Monsignor) on Jan 27, 2019 at 16:15 UTC |