Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Problem with Links SQL v. 2.2.0 global

Quote Reply
Problem with Links SQL v. 2.2.0 global
Hi,

I have a problem with the following code/global:

<%set numhits = 100%>
<%set maxhits = 10%>
<%ifnot nh%><%set nh=1%><%endif%>


sub {
my $tags = shift;
my ($output,$sth,$link);
my $db = $DB->table ('Links');
my $nh = $tags->{nh}||10;
my $mh = $tags->{maxhits}||100;
my $offset = ($nh-1) * $mh;
$db->select_options ("ORDER BY Mod_Date DESC", "LIMIT $offset, $mh");
my $sth = $db->select ( { isValidated => 'Yes', isChanged => 'Yes' });
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link', $link);
}
return $output;
}


Error:

Can't call method "fetchrow_hashref" on an undefined value at (eval 24) line 10.

GT::SQL::error = Failed to execute query: 'SELECT * FROM zz_Links WHERE isChanged = ? AND isValidated = ? ORDER BY Mod_Date DESC LIMIT 1.97403111175413e+16, SCALAR(0x85fdcac)' Reason: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SCALAR(0x85fdcac)' at line 1






If I just use "LIMIT 0, 10" - the results are displayed OK

Everything worked perfectly with Links SQL version 2.1.2

Crazy

Any ideas?


Thanks in advance!
Subject Author Views Date
Thread Problem with Links SQL v. 2.2.0 global Payooo 4118 May 9, 2004, 5:42 AM
Thread Re: [Payooo] Problem with Links SQL v. 2.2.0 global
afinlr 4021 May 9, 2004, 7:00 AM
Thread Re: [afinlr] Problem with Links SQL v. 2.2.0 global
Payooo 4011 May 9, 2004, 7:10 AM
Post Re: [Payooo] Problem with Links SQL v. 2.2.0 global
afinlr 3993 May 9, 2004, 7:14 AM
Thread Re: [afinlr] Problem with Links SQL v. 2.2.0 global
Payooo 4010 May 9, 2004, 7:21 AM
Thread Re: [Payooo] Problem with Links SQL v. 2.2.0 global
afinlr 3991 May 9, 2004, 7:26 AM
Post Re: [afinlr] Problem with Links SQL v. 2.2.0 global
Payooo 3986 May 9, 2004, 7:33 AM
Thread Re: [Payooo] Problem with Links SQL v. 2.2.0 global
Jagerman 3961 May 9, 2004, 12:20 PM
Post Re: [Jagerman] Problem with Links SQL v. 2.2.0 global
Payooo 3947 May 10, 2004, 7:15 AM
Post Re: [Jagerman] Problem with Links SQL v. 2.2.0 global
klangan 3893 Jun 22, 2004, 2:19 PM