Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Nedd syntax for an conditional with OR in a global

Quote Reply
Nedd syntax for an conditional with OR in a global
Hallo everbody,

need help for syntax for an conditional

Example:
my $count = $DB->table('CatLinks','Links')->count( GT::SQL::Condition->new( 'statistik','=','1', 'Status', '=', '200','CategoryID', 'IN', \@ids) );

the Status shoud have the value 200 OR 201 OR 202 OR 203 but NOT204

Need help for the correct syntax

Thanks
Jupp
Quote Reply
Re: [jupp] Nedd syntax for an conditional with OR in a global In reply to
Something like this (format changed for new version):

my $count = $DB->table('CatLinks','Links')->count( GT::SQL::Condition->new( statistik => '=' => '1', Status => 'IN' => ['200','201','202','203'],CategoryID => 'IN' => $ids) );
Quote Reply
Re: [afinlr] Nedd syntax for an conditional with OR in a global In reply to
Many thanks for your help , I modify your string at the end : change $ids to \@ids
now its run

Cheers jupp