I still had a problem with the select options; in the following global, they are not used !?
my $tags = shift;
my $cat_db = $DB->table ('Category', 'Links');
my $sth = $cat_db->select ({FatherID => 8},['Name','Title','Links.Description','Mod_Date']);
$cat_db->select_options('ORDER BY Mod_Date Desc', 'LIMIT 5');
my $output;
while (my ($catname,$title,$desc,$moddate) = $sth->fetchrow_array) {
$output .= qq~$moddate: $title in Rubrik: <a href="/Software/$catname">$catname</a><br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#9595FF"><img src="/img/b.gif" width="1" height="1"></td>
</tr>
</table>
~;
}
return $output;
}
BTW: I have another problem with this global; it passes every link a douzend times ?!
The sql i tried ti use is:
where Category.FatherID = '8'
ORDER BY Mod_Date Desc LIMIT 5
Hope someone has an idea?
Robert
Code:
sub { my $tags = shift;
my $cat_db = $DB->table ('Category', 'Links');
my $sth = $cat_db->select ({FatherID => 8},['Name','Title','Links.Description','Mod_Date']);
$cat_db->select_options('ORDER BY Mod_Date Desc', 'LIMIT 5');
my $output;
while (my ($catname,$title,$desc,$moddate) = $sth->fetchrow_array) {
$output .= qq~$moddate: $title in Rubrik: <a href="/Software/$catname">$catname</a><br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#9595FF"><img src="/img/b.gif" width="1" height="1"></td>
</tr>
</table>
~;
}
return $output;
}
BTW: I have another problem with this global; it passes every link a douzend times ?!
The sql i tried ti use is:
Code:
select Links.Title, Links.Description, Links.Mod_Date from Category, Links where Category.FatherID = '8'
ORDER BY Mod_Date Desc LIMIT 5
Hope someone has an idea?
Robert