Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [Bearwithme] relational query using Globals - Help

Quote Reply
Re: [Bearwithme] relational query using Globals - Help In reply to
Hi,

Sorry about the late reply! You have some syntax errors in your code. Try:

Code:
sub {
my $tags = shift;
my $id = $tags->{Category_ID};
my $table = $DB->table('catalog', 'catalog_sub_category');
$table->select_options ('ORDER BY Sub_Category');
my $sth = $table->select ([\"DISTINCT catalog.Sub_Category_ID", Sub_Category], { Category_ID => $category_ID });
my $output;
my $num;
while (my $row = $sth->fetchrow_hashref) {
$num = $num + 1;
($output .= "<font face=\"verdana,arial,helvetica\" size=\"-2\" color=red>$num.</font> <font face=\"verdana,arial,helvetica\" size=\"-2\"><a href=db.cgi?&sid=$tags->{session_id}>$row->{Sub_Category}</a></font><br><br>\n");
}
return $output;
}

Looks like it should work.

Cheers,

Alex
--
Gossamer Threads Inc.
Subject Author Views Date
Thread relational query using Globals - Help Bearwithme 9899 Nov 12, 2001, 1:31 PM
Thread Re: [Bearwithme] relational query using Globals - Help
Alex 9739 Nov 13, 2001, 11:06 AM
Thread Re: [Alex] relational query using Globals - Help
Bearwithme 9712 Nov 13, 2001, 11:56 AM
Post Post deleted by Bearwithme
Bearwithme 9652 Nov 14, 2001, 9:09 AM
Thread Re: [Bearwithme] relational query using Globals - Help
Alex 9647 Nov 16, 2001, 3:34 PM
Thread Re: [Alex] relational query using Globals - Help
Bearwithme 9606 Nov 16, 2001, 3:56 PM
Post Re: [Bearwithme] relational query using Globals - Help
Bearwithme 9642 Nov 18, 2001, 4:11 AM
Thread Re: [Bearwithme] relational query using Globals - Help
Bearwithme 9569 Nov 22, 2001, 9:48 PM
Thread Re: [Bearwithme] relational query using Globals - Help
jean 9535 Nov 23, 2001, 9:57 AM
Thread Re: [jean] relational query using Globals - Help
Bearwithme 9493 Nov 23, 2001, 12:06 PM
Thread Re: [Bearwithme] relational query using Globals - Help
jean 9562 Nov 23, 2001, 12:16 PM
Thread Re: [jean] relational query using Globals - Help
jean 9496 Nov 23, 2001, 6:20 PM
Thread Re: [jean] relational query using Globals - Help
Bearwithme 9535 Nov 23, 2001, 8:47 PM
Post Re: [Bearwithme] relational query using Globals - Help
Halito 9327 Mar 5, 2002, 8:13 AM
Post Re: [Alex] relational query using Globals - Help
Bearwithme 9669 Nov 14, 2001, 9:21 AM
Post Re: [Bearwithme] relational query using Globals - Help
Bearwithme 9681 Nov 14, 2001, 10:35 PM
Post Re: [Bearwithme] relational query using Globals - Help
Bearwithme 9622 Nov 16, 2001, 1:07 AM