Use trace() Tim.
On Wed, Oct 02, 2002 at 04:16:21PM -0500, Bill Hamilton wrote: > I am using DBI on NT4 , Informix 7.24 on a Sun box. > The dbi driver is ADO. > I seem to have a bug someplace when an aggregate function is used with >fetchrow_array. > Consider... > > $salessel = qq/SELECT sum(ship_units),sum(ship_cost) FROM material_hist > WHERE location_id = $locid > AND month_begin > (CURRENT - INTERVAL(365) DAY(5) to DAY) > AND material_id = /; > > (later) > $sql2 = $salessel . $material_id; > $sth2 = $dbh->prepare( $sql2 ); > $sth2->execute(); > ($sales_units,$sales_cost) = $sth2->fetchrow_array(); > $sth2->finish(); > > > The result is that the "sum(ship_cost)" is in returned in both $sales_units and >$ship_cost. > The statements works fine in dbaccess. > > Is this a bug in the ado driver or fetchrow_array? Bad code? > Suggestions? > >