Gossamer Forum
Quote Reply
Unhelpful SQL error :/
This is doing my head in;

Quote:
at /users2/j/public_html/cgi-bin/links/admin/Plugins/Real_Spider.pm line 480.

Code is;

Code:
479 -> my $table = $DB->table('SpiderURLS');
480 -> my $count = $table->count( { AssignedToPackage => $_, AlreadyChecked => 0 } ) or die $GT::SQL::error;

Anyone got ay ideas? Unsure

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!
Quote Reply
Re: [Andy] Unhelpful SQL error :/ In reply to
Anyone? I'm almost at the point of turning to Alcohol...lol... this is doing my head in Frown. I tried it on another copy of LSQL too, and that still gives the same 'error' :(

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!
Quote Reply
Re: [Andy] Unhelpful SQL error :/ In reply to
Just a suggestion - try:

my $cond = GT::SQL::Condition->new('AssignedToPackage', '=', $_, 'AlreadyChecked', '=', '0');

my $count = $table->count($cond) or die $GT::SQL::error;

I've had a quick look at my code - I'm using count successfully but in every case I'm using it in this form.

Are you sure that $_ has a value and have you tried '0' with quotes.

Last edited by:

afinlr: Sep 17, 2003, 5:03 PM
Quote Reply
Re: [afinlr] Unhelpful SQL error :/ In reply to
Hi. Thanks for the suggestion. I removed the || die part in my code, and it works! I just had to put;

if ($sth) {
....
}

around the 'while' loops. I have no idea whats going on here.. Its not related to just one installation (2.1.2), as I tried it on 3 seperate installations Unsure

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!