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

C.B. Currier interchange-users@icdevgroup.org
Wed Oct 2 10:45:03 2002


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