Gossamer Forum
Quote Reply
Condition->new
If the value in Results is grater than 0 then do whatever.

my $cond = GT::SQL::Condition->new('Results', 'IS NOT', \'0');

How is this done?

--------------------------------
Privacy Software
Quote Reply
Re: [BLOOD] Condition->new In reply to
Code:
my $cond = GT::SQL::Condition->new('Results', '>', '0');

.. that should do the trick :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Condition->new In reply to
Hi,

same Problem:

my $count = $DB->table('CatLinks','Links')->count( GT::SQL::Condition->new( 'statistik','=','1', Status => 'IN' => [$CFG->{http_bad}], 'CategoryID', 'IN', \@ids) );

runs perfect

but

my $count = $DB->table('CatLinks','Links')->count( GT::SQL::Condition->new( 'statistik','=','1', Status => 'NOT IN' => [$CFG->{http_bad}], 'CategoryID', 'IN', \@ids) );

runs not, syntax error, what is the correct from 'NOT IN' ???

Many thanks

Jupp