Hi,
You could make a little global to do it.
BE SURE TO BACKUP YOUR DATABASE FIRST THOUGH, JUST IN CASE!!! delete_categories
Code:
sub {
my $cond = GT::SQL::Condition->new(
'Full_Name' => 'the/full/name',
'Full_Name' => 'the/full/name2',
'Full_Name' => 'the/full2/name'
);
$cond->bool("OR");
my $sth = $DB->table('Category')->delete( $cond ) || die $GT::SQL::error;
return "done...";
}
Then make a new template called test.html, and put inside it:
Code:
<%delete_categories%>
Then run this from your browser:
page.cgi?p=test
This should then delete the categories that match your condition.
I can't stress enough how careful you need to be when doing this... so do be sure to make a backup
Also, once this has been run successfully, be sure to remove that global :)
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!