On Fri, Oct 04, 2002 at 10:49:14AM -0500, Bill Hamilton wrote:
> Many thanks for you help.
> I did as you suggested.
> I wrote a smaller version of the program to cut it down to just these two
> columns.
> 
> $oh_sel = qq/SELECT sum(s.qty_on_hand),sum(s.qty_committed) FROM bin_mat bm,
> stock s
>  WHERE bm.location_id = $locid AND s.bin_mat_id = bm.bin_mat_id AND
> bm.material_id = ? HAVING sum(s.qty_on_hand)=200 and sum(s.qty_committed)=22 /;
> 
> (snip)
> 
>     $sth2 = $dbh->prepare( $oh_sel );
>     $sth2->bind_param(1,$material_id);
>     $sth2->execute();
>     ($qtyqoh,$qtycom) = $sth2->fetchrow_array();
>     $sth2->finish();
> 
> The result was:
> onhand = 22
> committed = 22
> !!! but the on hand sum is really 200 !!!!

That certainly looks like a bug.

> I can work around for now by not using 2 sums in any sql statement.
> Whom should I report this bug to and how?

The author of the DBD driver: [EMAIL PROTECTED],
http://search.cpan.org/author/TLOWERY/

Tim.

Reply via email to