[ic] looping vs. query

Jon Jensen jon@akopia.com
Sat, 28 Apr 2001 16:21:25 -0500 (CDT)

On Sat, 28 Apr 2001, Dean Hall wrote:

> Hmm, just doesn't work with mine. It gets all rows that match the criteria,
> two that don't, and none of the fields (attributes) are correct -- the
> [prod-field image] seems to contain the entire row from the products.txt
> file, which is in the PIPE format while none of the other fields contain
> anything.

Add "st=db" to your search. I believe in IC 4.6 the default search type
may be messing you up. I just tried it with a pipe-delimited table and had
to do that. See mv_searchtype in the docs at:


> > > I can't reset a scratch variable after it's been set (even with
> > > [calc]$Scratch->counter++;return;[/calc])
> >
> > Try $Scratch->{counter}++ instead. $Scratch is a hashref. This is in the
> > docs.
> Yeah, that was just a type-o. I'm using the hashref. Still, it doesn't
> change. Any ideas why?

If it's inside a loop, you need to use [loop-calc] because loops are
parsed before the rest of the tags. It's mentioned at: