Interchange Developer Resource


[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

[ic] Call to $Tag->query in perl causing error opening table



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
_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users


Search for: Match: Format: Sort by: