[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] Re: not working on another table?


suppressed wrote:
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



thanks! that worked a charm. unfortunately i dont understand why it works though. i dont know what rf=sku does. i would rtfm except i cant find it there either!:(

any hope of pointing me to a good place to read about loops and searches and in particular more and more-list?

John

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.