[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] [loop] not working on another table?
i'm a newbie to interchange so this may be stupid. i have googled and
done my best to search the archives but i cant find an answer!
i have created a new table called news. i have created the
dbconf/mysql/news.mysql file (as you can guess i'm using mysql:), the
products/news.txt and products/news.sql files. i have added an entry to
the table. a query statement returns the contents of the table no problem:
[query st=db arrayref=myref sql="select sku from news order by sku"]
<!-- make query, this container text is not used. -->
[/query]
[perl]
# Get the query results, has multiple fields
$Scratch->{thingycount} = 0;
my $ary = $Tmp->{myref};
$Scratch->{thingy} = "";
foreach $line (@$ary){
($sku) = @$line;
$Scratch->{thingy} .= $sku."<br>\n";
}
return;
[/perl]
skus are [scratch thingy]
however when i try a simple loop it returns nothing and nothing is
reported as being wrong in the error.log:
[loop search="fi=news/st=db/ra=yes"]
[loop-field sku]
[/loop]
ive tried the piece of above code, replacing news with products and it
works away as happy as larry but when i change it to news is just
returns nothing!
i am using interchange 4.6.5
is there something simple i'm missing?
thanks
John