Akopia Akopia Services

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

[ic] Nested Queries



Hello all...

I'm trying to setup a nested query... here is what I have (most pulled from
mailing list archives):

[query sql="SELECT * FROM package_data WHERE pid='[value package]'" list=1
interpolate=1]
        [set token][sql-param sku][/set]
        [mvasp tables="products"]
        <%

        my $retval = "";
        my $dbh = $Sql{products};
        my $sql_query = "SELECT * FROM products WHERE
sku='$Scratch->{token}'";

        my $sth = $dbh->prepare($sql_query) or return error_message("can't
open products database");
        my $rc  = $sth->execute() or return HTML("can't open products
database");

        while($sku = $sth->fetchrow_arrayref()) {
                $retval .= "$sku->[0]|";
        }

        return $retval;
        %>
        [/mvasp]
[/query]

When I pull up the page, I get nothing; no results... I'm running IC 4.6.0
under RH Linux 7.  Any help would be appreciated...

Thanks in advance,

Jason Korkin.
President
Korksoft LLC
http://www.korksoft.com


_______________________________________________
Interchange-users mailing list
Interchange-users@lists.akopia.com
http://lists.akopia.com/mailman/listinfo/interchange-users


Search for: Match: Format: Sort by: