[ic] Re: trying to get a handle on this user tag thing
Jonathan Bartlett
interchange-users@icdevgroup.org
Wed Oct 2 11:35:01 2002
It looks like your query is either returning undef or the empty string,
which is why you can't dereference it as an array.
Jon
On Wed, 2002-10-02 at 10:28, racke@linuxia.de wrote:
> C.B. Currier writes:
>
> > I am trying to get the syntax to get a db handle for querying the current
> > db. Below is a sample of the code I have been using but have been getting
> > the following error. I have debugged the sql syntax and found it to work
> > correctly, not returning a null or 0 record result set. But I believe that
> > the result set returned is not compatable with my variable. Any guidance on
> > this is much appreciated.
> >
> > C.B.
> >
> > Code:
> >
> > sub {
> > my $itmcount = 0;
> >
> > my $tdb = $db{SKUShipZones};
> >
> > my $cart = $Carts->{main};
> > $itmcount = @$cart;
> > foreach (@$cart){
> > my $sql = 'Select * from SKUShipZones where sku = \''.$_->{code}.'\';';
> > my $qry = $Tag->query({sql => $sql,});
> > foreach (@$qry){
> > # <<<DO BLA >>>
> > }
> > }
> > return bla;
> > }
> > EOF
> >
> > Error:
> >
> > Runtime error: Can't use string ("") as an ARRAY ref while "strict refs" in
> > use at (eval 185) line 11
>
> I suppose there is something wrong with your query. Check your
> database logs.
>
> This is invalid too: return bla;
>
> 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.
> _______________________________________________
> interchange-users mailing list
> interchange-users@icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users