Just a quick question. Currently I am using the following to delete a list of links that have LinkOwner => ALLPOSTERS.
while (my $hit = $sth->fetchrow_hashref) {
push(@delete_ids,$hit->{ID});
}
foreach (@delete_ids) {
$DB->table('Links')->delete( { ID => $_ } );
print "Deleting lsql_Links: $_ \n";
}
This seems *very* slow (even with 20,000 records). I've tried a couple of other approaches, of which none seem to work :(
Any ideas?
$DB->table('Links')->delete( { LinkOwner => "ALLPOSTERS" } );
TIA
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!
Code:
my $sth = $DB->table('Links')->select( { LinkOwner => "ALLPOSTERS" } ) || die $GT::SQL::error; while (my $hit = $sth->fetchrow_hashref) {
push(@delete_ids,$hit->{ID});
}
foreach (@delete_ids) {
$DB->table('Links')->delete( { ID => $_ } );
print "Deleting lsql_Links: $_ \n";
}
This seems *very* slow (even with 20,000 records). I've tried a couple of other approaches, of which none seem to work :(
Any ideas?
$DB->table('Links')->delete( { LinkOwner => "ALLPOSTERS" } );
TIA
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!