Gossamer Forum
Quote Reply
Not deleting?
I'm trying to delete links from the tables lsql_Links and lsql_Category for more than one ID. I currently have;

Code:
# get the list of ID's we need to delete...
my $sth = $DB->table('CatLinks')->select( GT::SQL::Condition->new('LinkID','<','50000') ) || die $GT::SQL::error;
while (my $hit = $sth->fetchrow_hashref) {
push (@id_list , $hit->{LinkID});
}

# remove old listings first...
$DB->table('Links')->delete( { ID => \@id_list } ) || die $GT::SQL::error;
$DB->table('CatLinks')->delete( { LinkID => \@id_list } ) || die $GT::SQL::error;

I know that the while {} loop is working fine, cos if I use join() to see what ID numbers exist in it, and all the ID's that should have been put in it are there.

It much be down to the delete() call, but I don't understand why Unsure

Any suggestions?

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 Not deleting? Andy 2001 Dec 17, 2003, 10:03 AM
Thread Re: [Andy] Not deleting?
Andy 1919 Dec 18, 2003, 3:42 AM
Thread Re: [Andy] Not deleting?
afinlr 1909 Dec 18, 2003, 9:20 AM
Post Re: [afinlr] Not deleting?
Andy 1897 Dec 18, 2003, 9:22 AM