Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [SandraR] Wrong argument passed to this subroutine

Quote Reply
Re: [SandraR] Wrong argument passed to this subroutine In reply to
Try this script via Telnet/SSH;

Code:
#!/usr/bin/perl

use strict;
use lib './';
use Links qw/$IN $DB $CFG/;

local $SIG{__DIE__} = \&Links::fatal;

Links::init('./');

my $DEBUG = 1;

# first of all, lets actually get rid of all the categories...
my @id_list;
my $table = $DB->table('CatLinks');

my $sth = $table->select() || die $GT::SQL::error;

while (my $hit = $sth->fetchrow_hashref) {
if ($DB->table('Category')->count( { ID => $hit->{CategoryID} } ) < 1) {
print "Category ID $hit->{CategoryID} doesn't seem to exist... \n";
}
}

print "Finished .... ";

It should print out a list of bad category ID's, which are assigned to active links.

Hope that helps.

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 Wrong argument passed to this subroutine SandraR 3325 Dec 26, 2004, 9:11 PM
Thread Re: [SandraR] Wrong argument passed to this subroutine
SandraR 3241 Dec 31, 2004, 1:30 AM
Post Re: [SandraR] Wrong argument passed to this subroutine
SandraR 3227 Dec 31, 2004, 1:32 AM
Thread Re: [SandraR] Wrong argument passed to this subroutine
brewt 3251 Dec 31, 2004, 2:02 AM
Thread Re: [brewt] Wrong argument passed to this subroutine
SandraR 3227 Dec 31, 2004, 2:31 AM
Thread Re: [SandraR] Wrong argument passed to this subroutine
SandraR 3237 Dec 31, 2004, 2:32 AM
Thread Re: [SandraR] Wrong argument passed to this subroutine
Andy 3231 Dec 31, 2004, 3:50 AM
Thread Re: [Andy] Wrong argument passed to this subroutine
SandraR 3234 Dec 31, 2004, 11:32 AM
Post Re: [SandraR] Wrong argument passed to this subroutine
Andy 3217 Jan 1, 2005, 4:25 AM
Post Re: [Andy] Wrong argument passed to this subroutine
brewt 3230 Dec 31, 2004, 4:13 PM