[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Re: not working on another table?
John Allman writes:
> 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]
Either use rf=sku,... in the search parameter or [loop-data news sku]
within the loop.
Bye
Racke
--
Prolific Interchange Consulting (Excellent German Quality !).
Take a look at Materialboerse (http://www.materialboerse.de/), WITT
(http://www.witt-weiden.de/), Boxmover (http://shop.boxmover.ch/) or
Passionshop (http://www.passionshop.com/racke). Need a shop ? Contact us.