Hi,
I'm just doing a job, and I needed a NOT IN statement. For example, with an IN statement, we just do:
However, it doesn't seem like there is a NOT IN option?
I ended up having to do a bit of a dirty hack with:
$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?
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!
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?

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!