[ic] nuttyness with database select

interchange-users@icdevgroup.org interchange-users@icdevgroup.org
Fri Sep 6 10:39:02 2002


Quoting John Allman (allmanj@houseofireland.com):
> mike@perusion.com wrote:
> 
> >Quoting John Allman (allmanj@houseofireland.com):
> >  
> >
> >>[query arrayref=myref sql="select code,descrip,template from cattable 
> >>where code=252"]
> >><!--body not used... -->
> >>[/query]
> >>[perl]
> >>        foreach $line (@$ary) {
> >>                ($code,$descrip,$template) = @$line;
> >>                $Scratch->{foundstuff}="yes";
> >>        }
> >>[/perl]
> >>did i find stuff?[scratch foundstuff] says i<br>
> >>
> >>it just prints out "did i find stuff? says i"
> >>    
> >>
> >
> >If cattable is not in the same database as "products", then you
> >would need [query base=cattable ....]. Otherwise it should work.
> >
> >  
> >
> it _is_ in the same database as products, but that is not the same 
> database that everything else is in (if that's any help.) i added in the 
> line anyway and it made no difference. i realise it should work, which 
> is what's upsetting me. perhaps you could suggest an alternative means 
> of doing what i want? i'm something of a newbie to interchange and still 
> haven't found out all it's features.
> 

Oh, wait a minute. Where is your:

	my $ary = $Tmp->{myref};

??

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

Nature, to be commanded, must be obeyed. -- Francis Bacon