[ic] Re: trying to get a handle on this user tag thing

interchange-users@icdevgroup.org interchange-users@icdevgroup.org
Wed Oct 2 11:29:00 2002


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.