Gossamer Forum
Quote Reply
Global doesnt works!
Hi, my global should read out from the actual URL the parameter "Ausgabe" and should place a select to list the Links, that has "Ausgabe = x".

Code:
sub {
# Displays the newest links on the home page.
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
my $ausgabe = $IN->param('Ausgabe');
$search_db->select_options ('ORDER BY Add_Date ASC Limit 20');
$sth = $search_db->select ( { Ausgabe => '$ausgabe' });
while ($link = $sth->fetchrow_hashref) {
if (length $link->{Title} > 200) {
$link->{Title} = substr($link->{Title}, 0, 20) . '...';
}
$output .= Links::SiteHTML::display ('link', $link);
}
return $output;
}
Why it doesnt works?
Without my Ausgabe-Lines the global works very fine! It is from katabd!

Thanks in advance for your help!

Coyu
Quote Reply
Re: [Coyu] Global doesnt works! In reply to
Just a quick guess,

'$ausgabe'

get rid of the '

If you enclose a variable in '' means "don't substitute".



PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [Coyu] Global doesnt works! In reply to
Yeah, as pugdog said.. it should be either;

$sth = $search_db->select ( { Ausgabe => "$ausgabe" });

...or;

$sth = $search_db->select ( { Ausgabe => $ausgabe });

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!
Quote Reply
Re: [Andy] Global doesnt works! In reply to
Hey pugdod, hey Andy,

yepp... that helps!

Thank you very much! ,-)

Coyu