[ic] Call to $Tag->query in perl causing error opening table
interchange-users@interchange.redhat.com
interchange-users@interchange.redhat.com
Sun Oct 21 21:33:01 2001
This perl code:
[perl tables=awt_section]
my $crumbTrailIDs = $CGI->{crumb};
my @crumbs = split ( ",", $crumbTrailIDs );
my $output = "";
my $subCrumb = "";
my $crumbCount = 0;
foreach $crumb ( @crumbs ) {
if ( $crumbCount++ > 0 ) { $subCrumb .= ","; }
$subCrumb .= "$crumb";
my $sql = "select name from awt_section where section_id = $crumb";
my $sectionInfo = $Tag->query ( { sql => $sql, } );
$output .= "<h3>$sql</h3>\n<h4>sub is $subCrumb</h4>\n";
}
return ( $output );
[/perl]
(specifically the call to $Tag->query) produces this error:
[21/October/2001:19:10:04 -0600] awt_dev /cgi-bin/awt_dev/shop_section Safe:
Can't call method "open_table" on an undefined value at
/apps/interchange/lib/Vend/Data.pm line 899.
I searched on the text: Can't call method open table
in the archives and nothing came up. Any comments on what I
am doing wrong? This code is a direct rip off of the code
on page 221 of the Interchange 4.8 Reference Guide for the
[query] tag. If I remove the call to $Tag->query I get the
the following debug output.
select name from awt_section where section_id = 0
sub is 0
select name from awt_section where section_id = 11
sub is 0,11
Patrick Bennett
http://www.ccgenesis.com