Gossamer Forum
Quote Reply
Condition - help
is there an easier way to combine two "not" conditions than this?

Code:
my $cond1 = GT::SQL::Condition->new(
archive => '=' => "1"
); # Get all records that are...
$cond1->not;
my $cond2 = GT::SQL::Condition->new(
on_hold => '=' => "1"
);
$cond2->not;
my $cond = GT::SQL::Condition->new(
$cond1,
$cond2
);

regan
Quote Reply
Re: [ryel01] Condition - help In reply to
Why not just
Code:
my $cond = GT::SQL::Condition->new([archive => '<>' => 1], [on_hold => '<>' => 1]);

Adrian
Quote Reply
Re: [brewt] Condition - help In reply to
Hi Adrian

Thanks for that - I never knew "<>" was the equavilent of not - didn't see it in the notes at the bottom of the condition pm file.

Is there more info about the syntax somewhere else?

regan.