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

No NOT IN option for GT::SQL?

Quote Reply
No NOT IN option for GT::SQL?
Hi,

I'm just doing a job, and I needed a NOT IN statement. For example, with an IN statement, we just do:

Code:
$DB->table("Foo")->select( GT::SQL::Condition->new("Field",'IN",\@array_of_ids) )

However, it doesn't seem like there is a NOT IN option?

Code:
$DB->table("Foo")->select( GT::SQL::Condition->new("Field",'NOT IN",\@array_of_ids) )

I ended up having to do a bit of a dirty hack with:

Code:
my $ids = join(",",@ids);
$DB->table("Links")->do_query(qq|DELETE FROM glinks_Links WHERE HotelID NOT IN ($ids)|) || die $GT::SQL::error;

Am I missing the NOT IN feature, or does it just not exist? Any chance of adding it? Angelic

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!
Subject Author Views Date
Thread No NOT IN option for GT::SQL? Andy 5569 Oct 2, 2013, 7:44 AM
Thread Re: [Andy] No NOT IN option for GT::SQL?
el noe 5453 Oct 11, 2013, 3:34 AM
Thread Re: [el noe] No NOT IN option for GT::SQL?
Andy 5451 Oct 11, 2013, 3:37 AM
Thread Re: [Andy] No NOT IN option for GT::SQL?
el noe 5469 Oct 11, 2013, 6:08 AM
Thread Re: [el noe] No NOT IN option for GT::SQL?
Andy 5435 Oct 11, 2013, 7:02 AM
Thread Re: [Andy] No NOT IN option for GT::SQL?
el noe 5449 Oct 11, 2013, 7:10 AM
Thread Re: [el noe] No NOT IN option for GT::SQL?
Andy 5440 Oct 11, 2013, 7:21 AM
Post Re: [Andy] No NOT IN option for GT::SQL?
el noe 5449 Oct 11, 2013, 8:24 AM